import { NavLink } from 'react-router-dom'; import { motion, AnimatePresence } from 'framer-motion'; import { LayoutGrid, MessageSquarePlus, ScanFace, Building2, Sliders, Megaphone, Shield, Users, MessageCircle, type LucideIcon, } from 'lucide-react'; import { useStore } from '@/store/useStore'; import { MODULE_ROUTES } from '@/App'; import { isAdminRole } from '@/lib/velocityPlatformClient'; const NAV_ICONS: Record = { '/dashboard': LayoutGrid, '/oracle': MessageSquarePlus, '/sentinel': ScanFace, '/inventory': Building2, '/catalyst': Megaphone, '/comms': MessageCircle, '/settings': Sliders, '/admin': Shield, '/crm': Users, }; export function Sidebar() { const { sidebarExpanded, setSidebarExpanded, status, user } = useStore(); const visibleRoutes = MODULE_ROUTES.filter((route) => !route.adminOnly || isAdminRole(user?.role)); return ( setSidebarExpanded(true)} onMouseLeave={() => setSidebarExpanded(false)} > {/* Glassmorphism Background */}
{/* Content */}
{/* Brand Name */}

Velocity

v.1.1

{/* Nav */} {/* Status Footer */}
{status.serverStatus === 'online' && (
)}
{sidebarExpanded && (

{status.serverStatus === 'online' && 'Server Connected'} {status.serverStatus === 'offline' && 'Server Offline'} {status.serverStatus === 'syncing' && 'Syncing…'}

v{status.version}

)}
); }