'use client'; import { LayoutDashboard, Wallet, CreditCard, PiggyBank, Bell, Lightbulb, Settings, TrendingUp, X, } from 'lucide-react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { Logo } from './Logo'; interface SidebarProps { isOpen: boolean; onClose: () => void; unreadAlertsCount?: number; } const navigationItems = [ { name: 'Dashboard', href: '/', icon: LayoutDashboard }, { name: 'Ingresos', href: '/incomes', icon: TrendingUp }, { name: 'Deudas', href: '/debts', icon: Wallet }, { name: 'Tarjetas', href: '/cards', icon: CreditCard }, { name: 'Presupuesto', href: '/budget', icon: PiggyBank }, { name: 'Servicios', href: '/services', icon: Lightbulb }, { name: 'Configuración', href: '/settings', icon: Settings }, { name: 'Alertas', href: '/alerts', icon: Bell, hasBadge: true }, ]; export function Sidebar({ isOpen, onClose, unreadAlertsCount = 0, }: SidebarProps) { const pathname = usePathname(); const isActive = (href: string) => { if (href === '/') { return pathname === '/'; } return pathname.startsWith(href); }; return ( <> {/* Mobile overlay */} {isOpen && (
)} {/* Sidebar */} > ); }