import { ArrowUpRight, ChevronDown, Globe } from "lucide-react" import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" import type { Site } from "@/lib/types" import { catColor } from "@/lib/category" import { full } from "@/lib/format" import { href } from "@/lib/route" import { Logo } from "@/components/logo" import { officialLinks } from "@/lib/links" import { catName, getLang, setLang, T } from "@/lib/i18n" /** Sits on the hero video of every page: the MiniMax logo home, the language switch, and every * model page in a menu (the official site's pages at its foot). */ export function SiteHeader({ site }: { site: Site }) { const rel = (k: string) => site.releases.find((r) => r.key === k)! return (
{T.menu} {site.categories.map((c, i) => { const pages = c.releases.map(rel).filter((r) => r.page) const total = c.releases.reduce((a, k) => a + rel(k).n, 0) return ( {i > 0 && } {catName(c)} {full(total)} {pages.length > 1 && pages.map((r) => ( {r.name} {full(r.n)} ))} ) })} {T.elsewhere} {[...officialLinks().map((l) => ({ label: T.officialLink(l.label), href: l.href })), { label: T.hfOrg, href: "https://huggingface.co/MiniMaxAI" }].map((l) => ( {l.label} ))}
) }