import { getLang } from "@/lib/i18n" /** The official page for a modality's models: every language release links to M Plan, every * video and image release to the H3 Family page. English goes to minimax.io, Chinese to the * same pages on minimax.cn. Shown as a button on each release's page and in the Models menu. * Keys are category keys (org.CATEGORY_NAME). */ const PAGE: Record = { language: { label: "M Plan", path: "/m-plan" }, video: { label: "H3 Family", path: "/h3-family" }, image: { label: "H3 Family", path: "/h3-family" }, } const site = () => (getLang() === "zh" ? "https://www.minimax.cn" : "https://www.minimax.io") export function officialPage(cat: string): { label: string; href: string } | undefined { const p = PAGE[cat] return p && { label: p.label, href: site() + p.path } } /** The same pages once each, for the menu (H3 Family first, as the video category leads the page). */ export const officialLinks = () => [...new Map(["video", "image", "language"].map((c) => officialPage(c)!).map((l) => [l.href, l])).values()]