"use client"; // The workspace view-mode control: [ Search | Chat | Split ]. The two focused // single-pane views come first, the combined view last. Search and Chat are real // Links (client-side routing between `/` and `/ask`, so the URL + the persistent // search bar stay in lockstep); Split is a client toggle that shows both panes // side by side. Below `lg` Split isn't offered and the control degrades to the // two-state Search ⇄ Chat tabs — fullscreen-either is the only sensible form on a // phone. Trailing slashes match the static export's trailingSlash:true. import Link from "next/link"; import { ColumnsIcon, MessageSquareIcon, SearchIcon } from "lucide-react"; import { useWorkspaceView } from "./WorkspaceView"; // Reads its state from WorkspaceViewProvider rather than taking props, because // it is rendered in the search bar (a common/ component that cannot import it) // while the panes it governs are rendered in WorkspaceView. export default function WorkspaceNav() { const { onAsk, view, wide, setSplit } = useWorkspaceView(); const onPickSingle = () => setSplit(false); const onPickSplit = () => setSplit(true); const split = view === "split"; const base = "inline-flex items-center gap-1.5 px-3 py-1.5 font-medium transition-colors"; const active = "bg-primary text-primary-foreground"; const idle = "text-muted-foreground hover:bg-accent hover:text-accent-foreground"; return (