"use client"; import { cn } from "@/lib/utils"; import { Settings, HelpCircle, User, Key, Palette, Sparkles, } 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: "home" as NavSection, icon: Sparkles, label: "AI Chat", href: "/project/{projectId}/overview" }, { id: "design" as NavSection, icon: Palette, label: "Design", href: "/project/{projectId}/design" }, ]; 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 */}
{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 */}
); }