'use client' import Link from 'next/link' import { usePathname } from 'next/navigation' import { cn } from '@/lib/utils' import { Monitor, LayoutDashboard, Laptop, History, Settings, Download, Link2, ShieldCheck } from 'lucide-react' interface Profile { fullName: string | null company: string | null role: string | null } interface AuthUser { id: string email: string name: string } interface DashboardSidebarProps { user: AuthUser profile: Profile | null } const navItems = [ { href: '/dashboard', icon: LayoutDashboard, label: 'Overview' }, { href: '/dashboard/machines', icon: Laptop, label: 'Machines' }, { href: '/dashboard/connect', icon: Link2, label: 'Quick Connect' }, { href: '/dashboard/sessions', icon: History, label: 'Sessions' }, { href: '/download', icon: Download, label: 'Download Agent' }, { href: '/dashboard/settings', icon: Settings, label: 'Settings' }, ] const adminNavItems = [ { href: '/dashboard/admin', icon: ShieldCheck, label: 'Admin' }, ] export function DashboardSidebar({ profile }: DashboardSidebarProps) { const pathname = usePathname() const isAdmin = profile?.role === 'admin' const allNavItems = isAdmin ? [...navItems, ...adminNavItems] : navItems return ( ) }