import { useNavigate } from 'react-router-dom'; import { BrandMark } from '../../../shared/components/BrandMark'; import { clearSession } from '../../auth/services/sessionService'; const navigationBySection = { supervisor: [ { id: 'dashboard', label: 'Dashboard', count: null }, { id: 'queues', label: 'Filas em tempo real', count: 42 }, { id: 'areas', label: 'Especialidades supervisionadas', count: 3 }, { id: 'agents', label: 'Agentes online', count: 18 }, { id: 'reports', label: 'Relatórios', count: null }, ], admin: [ { id: 'home', label: 'Home' }, { id: 'today', label: 'Operação' }, { type: 'separator' }, { id: 'users-access', label: 'Usuários & Acessos' }, { id: 'templates', label: 'Templates' }, { id: 'knowledge', label: 'Base de conhecimento IA' }, { id: 'audit', label: 'Auditoria' }, { id: 'channels', label: 'Canais' }, { type: 'separator' }, { id: 'attendance', label: 'Atendimento' }, { id: 'new-attendance', label: 'Abrir Atendimento', path: '/new-attendance' }, { id: 'mass-message', label: 'Disparo em Massa' }, { id: 'contacts', label: 'Contatos' }, { type: 'separator' }, { id: 'settings', label: 'Configurações' }, ], }; const actionLabelBySection = { supervisor: '+ Redistribuir atendimento', admin: '+ Nova configuração', }; export function ManagementLayout({ title, subtitle, activeSection, profileLabel, initials, children, isDesktop, isMobile, activeNavItem, onNavItemChange, }) { const navigate = useNavigate(); const navItems = navigationBySection[activeSection] || navigationBySection.supervisor; const actionLabel = actionLabelBySection[activeSection] || '+ Nova ação'; function handleLogout() { clearSession(); navigate('/login', { replace: true }); } return (

{title}

{subtitle}

{profileLabel} Ambiente de gestão
{children}
); }