/** * @license * SPDX-License-Identifier: Apache-2.0 */ import React from 'react'; import { LayoutDashboard, Store, Layers, Settings, TrendingUp, ShieldAlert, Users, Truck, Box, Monitor } from 'lucide-react'; import { NavLink, useLocation } from 'react-router-dom'; import { MainSection } from '../types'; interface SidebarProps { isCoimbatoreView: boolean; setIsCoimbatoreView: (val: boolean) => void; isOpen: boolean; isAdmin?: boolean; onClose: () => void; } export default function Sidebar({ isCoimbatoreView, setIsCoimbatoreView, isOpen, isAdmin, onClose }: SidebarProps) { const location = useLocation(); // Navigation elements const navItems = [ { id: 'dashboard' as MainSection, label: 'Dashboard', icon: LayoutDashboard }, { id: 'inventory' as MainSection, label: 'Products', icon: Layers }, { id: 'reports' as MainSection, label: 'Reports', icon: TrendingUp }, { id: 'dispatch' as MainSection, label: 'Console', icon: Truck }, { id: 'pos' as MainSection, label: 'POS', icon: Monitor }, { id: 'settings' as MainSection, label: 'Settings', icon: Settings } ]; return ( <> {/* Mobile Overlay */} {isOpen && (
)} ); }