import React from 'react'; import { Car, ShoppingCart, BarChart3, Menu, X } from 'lucide-react'; import { Link, useLocation } from 'react-router-dom'; interface LayoutProps { children: React.ReactNode; } const Layout: React.FC = ({ children }) => { const [isSidebarOpen, setIsSidebarOpen] = React.useState(false); const location = useLocation(); const navItems = [ { name: 'Dashboard', path: '/', icon: BarChart3 }, { name: 'Inventory', path: '/inventory', icon: Car }, { name: 'Sales & Orders', path: '/sales', icon: ShoppingCart }, ]; return (
{/* Mobile Sidebar Backdrop */} {isSidebarOpen && (
setIsSidebarOpen(false)} /> )} {/* Sidebar */} {/* Main Content */}
CarShop
{/* Spacer for centering */}
{children}
); }; export default Layout;