"use client"; import { useState } from 'react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { LayoutDashboard, Newspaper, Folders, Building2, MapPin, BadgeDollarSign, FileText, LogOut, ChevronDown, ChevronRight, Image as ImageIcon, Settings, Calendar } from 'lucide-react'; import { logout } from '@/app/actions/auth'; export const Sidebar = ({ user }: { user: any }) => { const pathname = usePathname(); const [openSections, setOpenSections] = useState>({ directorio: true, geografia: false, comercial: false, sistema: false }); const toggleSection = (section: string) => { setOpenSections(prev => ({ ...prev, [section]: !prev[section] })); }; const sections = [ { id: 'directorio', title: 'Directorio', items: [ { name: 'Clientes', href: '/dashboard/clients', icon: Building2 }, { name: 'Tipos de Cliente', href: '/dashboard/client_types', icon: Building2 }, ] }, { id: 'geografia', title: 'Geografía', items: [ { name: 'Países', href: '/dashboard/countries', icon: MapPin }, { name: 'Departamentos', href: '/dashboard/departments', icon: MapPin }, { name: 'Ciudades', href: '/dashboard/cities', icon: MapPin }, ] }, { id: 'comercial', title: 'Comercial', items: [ { name: 'Contratos', href: '/dashboard/contracts', icon: FileText }, { name: 'Formas de Pago', href: '/dashboard/payment_methods', icon: BadgeDollarSign }, ] }, { id: 'archivos', title: 'Contenido Multimedia', items: [ { name: 'Biblioteca de Medios', href: '/dashboard/media', icon: ImageIcon }, ] }, { id: 'sistema', title: 'Sistema y Motor', items: [ { name: 'Perfil de Entidad', href: '/dashboard/entity', icon: Building2 }, { name: 'Parrilla Programación', href: '/dashboard/programming', icon: Calendar }, { name: 'Configuración Global', href: '/dashboard/settings', icon: Settings }, ] } ]; return ( ); };