"use client"; import Link from "next/link"; import { ArrowRight, Info } from "lucide-react"; import { useTranslation } from "react-i18next"; import { subPanelClass } from "./shared"; export type ModelSectionGuideKind = | "connections" | "llm" | "task-models" | "embedding" | "search" | "voice" | "multimodal"; const GUIDE_CONFIG: Record< ModelSectionGuideKind, { badgeKey: string; tone: "required" | "recommended" | "optional"; purposeKey: string; ifUnsetKey: string; } > = { connections: { badgeKey: "modelGuide.badge.sharedCredentials", tone: "required", purposeKey: "modelGuide.connections.purpose", ifUnsetKey: "modelGuide.connections.ifUnset", }, llm: { badgeKey: "quickSetup.progress.required", tone: "required", purposeKey: "modelGuide.llm.purpose", ifUnsetKey: "modelGuide.llm.ifUnset", }, "task-models": { badgeKey: "modelGuide.badge.autoByDefault", tone: "optional", purposeKey: "modelGuide.taskModels.purpose", ifUnsetKey: "modelGuide.taskModels.ifUnset", }, embedding: { badgeKey: "quickSetup.progress.recommended", tone: "recommended", purposeKey: "modelGuide.embedding.purpose", ifUnsetKey: "modelGuide.embedding.ifUnset", }, search: { badgeKey: "quickSetup.progress.optional", tone: "optional", purposeKey: "modelGuide.search.purpose", ifUnsetKey: "modelGuide.search.ifUnset", }, voice: { badgeKey: "quickSetup.progress.optional", tone: "optional", purposeKey: "modelGuide.voice.purpose", ifUnsetKey: "modelGuide.voice.ifUnset", }, multimodal: { badgeKey: "quickSetup.progress.optional", tone: "optional", purposeKey: "modelGuide.multimodal.purpose", ifUnsetKey: "modelGuide.multimodal.ifUnset", }, }; export function ModelSectionGuideBanner({ kind, }: { kind: ModelSectionGuideKind; }) { const { t } = useTranslation(); const cfg = GUIDE_CONFIG[kind]; const badgeToneClass = cfg.tone === "required" ? "bg-[color-mix(in_srgb,var(--foreground)_10%,transparent)] text-[var(--foreground)]" : cfg.tone === "recommended" ? "bg-emerald-500/10 text-emerald-700 dark:text-emerald-400" : "bg-[color-mix(in_srgb,var(--muted)_95%,transparent)] text-[var(--muted-foreground)]"; return ( ); }