"use client"; import Link from "next/link"; import { Database, Plus, Sparkles } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useI18n } from "@/i18n/i18n-context"; import type { KnowledgeBase } from "@/types/knowledge-base"; import { MountPicker } from "./mount-picker"; interface MountEmptyStateProps { /** All KBs that exist in the project. When empty we fall back to a * "create your first KB" hero instead of the picker. */ kbs: KnowledgeBase[]; onAdd: (kb: KnowledgeBase) => void; } /** * Hero call-to-action shown when the chat session has zero mounted KBs. The * card is intentionally the visual focal point of the panel — beginners * previously missed the inline Select trigger because it read as a hint * label rather than an action. * * Two variants: * • `kbs.length > 0` → primary button opens the searchable picker * • `kbs.length === 0` → primary link sends the user to the KB creation page * (no picker would have any items to offer) */ export function MountEmptyState({ kbs, onAdd }: MountEmptyStateProps) { const { t } = useI18n(); const hasNoKbs = kbs.length === 0; return (
{/* Decorative corner spark — subtle brand accent, no semantic meaning */} {/* Soft-tinted icon tile mirroring the home empty-state visual language */}

{hasNoKbs ? t("chat.mount.emptyNoKbTitle") : t("chat.mount.emptyMountTitle")}

{hasNoKbs ? t("chat.mount.emptyNoKbDesc") : t("chat.mount.emptyMountDesc")}

{hasNoKbs ? ( ) : ( )} {!hasNoKbs ? (

{t("chat.mount.selectFromExistingPrefix")}{" "} {kbs.length} {" "} {t("chat.mount.selectFromExistingSuffix")}

) : null}
); }