{group.items.map((item) => {
const route = routeMap[item.id] || '/dashboard';
const isActive = activeView === item.id;
return (
{
handleMobileNav();
onNavigate?.(item.id);
}}
className={cn(
'w-full flex items-center px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200 group relative overflow-hidden',
isActive
? 'bg-primary/10 text-foreground shadow-[inset_2px_0_0_0_var(--color-primary)]'
: 'text-muted-foreground hover:text-foreground hover:bg-muted',
!sidebarOpen && "justify-center px-0"
)}
title={!sidebarOpen ? item.label : undefined}
>
{/* Glow for active state */}
{isActive && (
)}
{item.icon}
{item.label}
{/* Badges */}
{item.badge && sidebarOpen && (
{item.badge}
)}
{item.badge && !sidebarOpen && (
)}
);
})}