"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; import { LayoutGrid, Cable, Key, Users, Settings, DollarSign, LogOut, } from "lucide-react"; import { Separator } from "@/components/ui/separator"; import { signOut } from "next-auth/react"; interface WorkspaceLeftRailProps { activeSection?: string; onSectionChange: (section: string) => void; } const navItems = [ { id: 'projects', label: 'Projects', icon: LayoutGrid, href: '/projects', }, { id: 'connections', label: 'Connect', icon: Cable, href: '/connections', }, { id: 'keys', label: 'Keys', icon: Key, href: '/keys', }, { id: 'costs', label: 'Costs', icon: DollarSign, href: '/costs', }, { id: 'users', label: 'Users', icon: Users, href: '/users', }, ]; export function WorkspaceLeftRail({ activeSection = 'projects', onSectionChange }: WorkspaceLeftRailProps) { const pathname = usePathname(); // Extract workspace from pathname (e.g., /marks-account/projects -> marks-account) const workspace = pathname?.split('/')[1] || 'marks-account'; const handleSignOut = async () => { await signOut({ callbackUrl: "/auth" }); }; return (