import type { SyncStatus } from "@/app/lib/usePlanState"; import { BudgetMeter } from "./BudgetMeter"; import { SiteHeader } from "./SiteHeader"; interface NavbarProps { checkoutTotal: number; budget: number; syncStatus: SyncStatus; isGenerating: boolean; } const SYNC_LABEL: Record = { saved: { text: "Saved on device", dot: "bg-status-ok" }, error: { text: "Storage blocked", dot: "bg-status-danger" }, }; export function Navbar({ checkoutTotal, budget, syncStatus, isGenerating }: NavbarProps) { const sync = isGenerating ? { text: "Building plan…", dot: "bg-status-warn animate-pulse" } : SYNC_LABEL[syncStatus]; return ( {sync.text} } rightSlot={
} /> ); }