"use client"; import { cn } from "@/lib/utils"; import { LayoutGrid, Inbox, Users, Receipt, Globe, FileText, MessageCircle, Settings, HelpCircle, User, DollarSign, Key, Palette, Target, Megaphone, ClipboardList, Code2, Sparkles, Cog, GitBranch, } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; import Link from "next/link"; import { toast } from "sonner"; type NavSection = "home" | "ai-chat" | "docs" | "plan" | "design" | "tech" | "journey" | "settings"; const NAV_ITEMS = [ { id: "plan" as NavSection, icon: ClipboardList, label: "Plan", href: "/project/{projectId}/plan" }, { id: "docs" as NavSection, icon: FileText, label: "Docs", href: "/project/{projectId}/docs" }, { id: "design" as NavSection, icon: Palette, label: "Design", href: "/project/{projectId}/design" }, { id: "tech" as NavSection, icon: Cog, label: "Tech", href: "/project/{projectId}/tech" }, { id: "journey" as NavSection, icon: GitBranch, label: "Journey", href: "/project/{projectId}/journey" }, ]; interface LeftRailProps { activeSection: string; onSectionChange: (section: string) => void; projectName?: string; projectId?: string; workspace?: string; } export function LeftRail({ activeSection, onSectionChange, projectName, projectId, workspace = 'marks-account' }: LeftRailProps) { return (
{/* Vib'n Logo */} Vib'n
{/* Main Navigation Items */}
{/* AI Chat - Always visible */} {projectName && projectId && ( AI Chat {activeSection === "ai-chat" && (
)} )} {/* Other Nav Items */} {NAV_ITEMS.map((item) => { if (!projectId) return null; const fullHref = `/${workspace}${item.href.replace('{projectId}', projectId)}`; return ( onSectionChange(item.id)} className={cn( "flex flex-col items-center gap-1 w-full py-2 px-2 transition-all relative", activeSection === item.id ? "text-primary bg-primary/5" : "text-muted-foreground hover:text-foreground hover:bg-accent" )} title={item.label} > {item.label} {activeSection === item.id && (
)} ); })}
{/* Bottom Items */}
); }