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: 'Areas supervisionadas', count: 3 }, { id: 'agents', label: 'Agentes online', count: 18 }, { id: 'reports', label: 'Relatorios', count: null }, ], admin: [ { id: 'dashboard', label: 'Dashboard', count: null }, { id: 'users', label: 'Usuarios e acessos', count: 64 }, { id: 'areas', label: 'Areas', count: 3 }, { id: 'knowledge', label: 'Conteudo para IA', count: 28 }, { id: 'channels', label: 'Canais', count: 1 }, { id: 'audit', label: 'Auditoria', count: null }, ], }; const actionLabelBySection = { supervisor: '+ Redistribuir atendimento', admin: '+ Nova configuracao', }; export function ManagementLayout({ title, subtitle, activeSection, profileLabel, initials, children, isDesktop, isMobile, }) { const navigate = useNavigate(); const navItems = navigationBySection[activeSection] || navigationBySection.supervisor; const actionLabel = actionLabelBySection[activeSection] || '+ Nova acao'; function handleLogout() { clearSession(); navigate('/login', { replace: true }); } return (

{title}

{subtitle}

{profileLabel} Ambiente de gestao
{children}
); }