import { LayoutDashboard, Building2, Package, Receipt, MessageSquare, Bell, Settings, Users, ShoppingCart, Wallet, Mail, UsersRound, UserRound, type LucideIcon, } from 'lucide-react'; import type { UserRole } from '@/lib/auth/jwt'; export interface NavItem { href: string; label: string; icon: LucideIcon; /** Sem `roles`, visível para qualquer papel autenticado da área. */ roles?: UserRole[]; /** Grupo expansível (ex: Alertas → Templates/Logs); `href` é o destino padrão. */ children?: { href: string; label: string }[]; } export const MASTER_NAV_ITEMS: NavItem[] = [ { href: '/master/dashboard', label: 'Dashboard', icon: LayoutDashboard }, { href: '/master/tenants', label: 'Tenants', icon: Building2 }, { href: '/master/planos', label: 'Planos', icon: Package }, { href: '/master/faturas', label: 'Faturas', icon: Receipt }, { href: '/master/evolution-config', label: 'Evolution API', icon: MessageSquare }, { href: '/master/alertas/templates', label: 'Alertas', icon: Bell, children: [ { href: '/master/alertas/templates', label: 'Templates' }, { href: '/master/alertas/logs', label: 'Logs' }, ], }, { href: '/master/configuracoes', label: 'Configurações', icon: Settings }, ]; /** 4 principais da bottom tab bar do master (Etapa 14) — o resto entra em "Mais". */ export const MASTER_BOTTOM_HREFS = [ '/master/dashboard', '/master/tenants', '/master/faturas', '/master/alertas/templates', ]; export const TENANT_NAV_ITEMS: NavItem[] = [ { href: '/app/dashboard', label: 'Dashboard', icon: LayoutDashboard }, { href: '/app/clientes', label: 'Clientes', icon: Users }, { href: '/app/produtos', label: 'Produtos', icon: Package }, { href: '/app/vendas', label: 'Vendas', icon: ShoppingCart }, { href: '/app/recebimentos', label: 'Recebimentos', icon: Wallet }, { href: '/app/whatsapp', label: 'WhatsApp', icon: MessageSquare }, { href: '/app/email-config', label: 'E-mail', icon: Mail }, { href: '/app/alertas/templates', label: 'Alertas', icon: Bell, children: [ { href: '/app/alertas/templates', label: 'Templates' }, { href: '/app/alertas/logs', label: 'Logs' }, ], }, { href: '/app/equipe', label: 'Equipe', icon: UsersRound, roles: ['tenant_admin'] }, { href: '/app/perfil', label: 'Perfil', icon: UserRound }, ]; /** 4 principais da bottom tab bar do tenant (Etapa 14) — o resto entra em "Mais". */ export const TENANT_BOTTOM_HREFS = ['/app/dashboard', '/app/clientes', '/app/vendas', '/app/recebimentos']; export function filterByRole(items: NavItem[], role: UserRole | undefined): NavItem[] { return items.filter((item) => !item.roles || (role && item.roles.includes(role))); }