import { useNavigate } from 'react-router-dom'; import { BrandMark } from '../../../shared/components/BrandMark'; import { clearSession } from '../../auth/services/sessionService'; const navigationBySection = { supervisor: [ { id: 'dashboard', label: 'Home' }, { id: 'templates', label: 'Templates' }, { id: 'knowledge', label: 'Fluxo do Bot' }, { id: 'ai-contents', label: 'Conteúdos da IA' }, { id: 'audit', label: 'Auditoria' }, { type: 'separator' }, { id: 'attendance', label: 'Atendimento' }, { id: 'new-attendance', label: 'Abrir Atendimento' }, { id: 'mass-message', label: 'Disparo em Massa' }, { id: 'contacts', label: 'Contatos' }, ], admin: [ { id: 'today', label: 'Operação' }, { type: 'separator' }, { id: 'users-access', label: 'Usuários & Acessos' }, { id: 'templates', label: 'Templates' }, { id: 'knowledge', label: 'Fluxo do Bot' }, { id: 'ai-contents', label: 'Conteúdos da IA' }, { id: 'audit', label: 'Auditoria' }, { id: 'channels', label: 'Canais e Integração' }, { type: 'separator' }, { id: 'attendance', label: 'Atendimento' }, { id: 'new-attendance', label: 'Abrir Atendimento' }, { id: 'mass-message', label: 'Disparo em Massa' }, { id: 'contacts', label: 'Contatos' }, { type: 'separator' }, { id: 'settings', label: 'Configurações' }, ], }; const actionLabelBySection = { supervisor: '+ Redistribuir atendimento', admin: 'Home', }; 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] || 'Home'; function handleLogout() { clearSession(); navigate('/login', { replace: true }); } return (

{title}

{subtitle}

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