{{-- Nav Item Component This component renders a navigation item with consistent styling in different navigation areas: - Sidebar navigation - Mobile bottom navigation Parameters: - icon: The Lucide icon name (e.g., 'gamepad-2') - rendered via @svg('lucide-' . $icon) - label: The link text to display - route: The route name or URL to link to (optional) - active: Boolean indicating if this item is active - hideOnMobile: Boolean indicating if this item should be hidden on mobile view (for sidebar) - tooltip: Tooltip text to show on hover (for sidebar) - modal: ID of modal to toggle when clicked (optional) - badge: Badge content to display on the icon (optional) --}} @props([ 'icon', 'label', 'route' => '#', 'active' => false, 'hideOnMobile' => false, 'tooltip' => null, 'modal' => null, 'badge' => null, 'badgeClass' => 'bg-danger', ]) @php // Parse the route if it's not already a URL if ($route !== '#' && strpos($route, 'http') !== 0) { $routeUrl = route($route); } else { $routeUrl = $route; } // CSS classes based on props $itemClasses = 'nav-item ' . ($active ? 'active ' : '') . ($hideOnMobile ? 'hide-on-mobile ' : ''); @endphp