import React from 'react'; import { NavLink, useLocation } from 'react-router-dom'; import { LayoutDashboard, ReceiptText, Package, Users, MoreHorizontal } from 'lucide-react'; import { __ } from '@/lib/i18n'; interface BottomNavItem { to: string; icon: React.ReactNode; label: string; startsWith?: string; } const navItems: BottomNavItem[] = [ { to: '/dashboard', icon: , label: __('Dashboard'), startsWith: '/dashboard' }, { to: '/orders', icon: , label: __('Orders'), startsWith: '/orders' }, { to: '/products', icon: , label: __('Products'), startsWith: '/products' }, { to: '/customers', icon: , label: __('Customers'), startsWith: '/customers' }, { to: '/more', icon: , label: __('More'), startsWith: '/more' } ]; export function BottomNav() { const location = useLocation(); const isActive = (item: BottomNavItem) => { if (item.startsWith) { return location.pathname.startsWith(item.startsWith); } return location.pathname === item.to; }; return ( ); }