'use client' import Link from 'next/link' import { usePathname } from 'next/navigation' import { cn } from '@/lib/utils' import { Button } from '@/components/ui/button' import { Monitor, LayoutDashboard, Laptop, History, Settings, Download, Link2, ShieldCheck, X } from 'lucide-react' interface Profile { fullName: string | null company: string | null role: string | null } interface MobileNavProps { open: boolean onClose: () => void 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 MobileNav({ open, onClose, profile }: MobileNavProps) { const pathname = usePathname() const isAdmin = profile?.role === 'admin' const allNavItems = isAdmin ? [...navItems, ...adminNavItems] : navItems if (!open) return null return ( <>
RemoteLink
{profile?.fullName?.charAt(0)?.toUpperCase() || 'U'}

{profile?.fullName || 'User'}

{profile?.company || 'Personal'}

) }