import type { ReactNode } from 'react' import { Link, useLocation } from 'react-router' import { Bot, Inbox, type LucideIcon, LayoutDashboard, LogOut, Network, ShieldCheck } from 'lucide-react' import { Button } from '@/components/ui/button' import { Separator } from '@/components/ui/separator' import { cn } from '@/lib/utils' import { useAuth } from '@/store/auth' export function AppShell({ children }: { children: ReactNode }) { const email = useAuth((s) => s.email) const logout = useAuth((s) => s.logout) return (
{children}
) } function NavItem({ icon: Icon, label, to, muted, }: { icon: LucideIcon label: string to?: string muted?: boolean }) { const location = useLocation() const active = to ? location.pathname === to : false const className = cn( 'flex items-center gap-3 rounded-md px-3 py-2 text-sm', active ? 'bg-sidebar-accent font-medium text-sidebar-accent-foreground' : 'text-sidebar-foreground/80', muted ? 'opacity-50' : 'hover:bg-sidebar-accent/60', ) const content = ( <> {label} {muted && soon} ) if (!to || muted) { return {content} } return ( {content} ) }