'use client' import { useState } from 'react' import { Bell, Search, User, LogOut, Settings, ChevronDown, Menu } from 'lucide-react' import { cn } from '@/lib/utils' import ClientSelector from './ClientSelector' import { useSelectedClient } from '@/components/providers/SelectedClientProvider' export type HeaderClient = { id: string; nombre: string; codigo: string } interface HeaderProps { user?: { nombre: string email: string avatar?: string rol: string } onLogout?: () => void clients?: HeaderClient[] showAllClientsOption?: boolean onOpenSidebar?: () => void } export default function Header({ user, onLogout, clients = [], showAllClientsOption = false, onOpenSidebar, }: HeaderProps) { const [showUserMenu, setShowUserMenu] = useState(false) const [showNotifications, setShowNotifications] = useState(false) const { selectedClientId, setSelectedClientId } = useSelectedClient() return (
{onOpenSidebar != null && ( )}
{/* Client Selector */}
{/* Right section */}
{/* Notifications */}
{showNotifications && ( <>
setShowNotifications(false)} />

Notificaciones

)}
{/* User menu */}
{showUserMenu && ( <>
setShowUserMenu(false)} />
{user?.nombre}
{user?.email}
Mi perfil Configuracion
)}
) } interface NotificationItemProps { type: 'critical' | 'warning' | 'info' title: string message: string time: string } function NotificationItem({ type, title, message, time }: NotificationItemProps) { const colors = { critical: 'bg-danger/20 border-danger', warning: 'bg-warning/20 border-warning', info: 'bg-info/20 border-info', } return (
{title}
{message}
{time}
) }