import { LayoutDashboard, Settings2, Users, Shield, Briefcase, Ship, Receipt, Building2, Building, } from '@lucide/svelte'; export type SystemContext = 'fixed_asset' | 'inventory'; export interface NavItem { title: string; url: string; permission?: string; systemContext?: SystemContext; } export interface NavMainItem { title: string; url: string; icon: any; isActive?: boolean; permission?: string; items?: NavItem[]; } /** * Navegación principal del dashboard. * Agrega aquí los módulos de tu proyecto. */ export function getNavMain(): NavMainItem[] { return [ { title: 'Dashboard', url: '/dashboard', icon: LayoutDashboard, }, { title: 'CRM', url: '/dashboard/crm', icon: Briefcase, items: [ { title: 'Panel', url: '/dashboard/crm' }, { title: 'Clientes / Prospectos', url: '/dashboard/crm/cuentas' }, { title: 'Proveedores', url: '/dashboard/crm/proveedores' }, { title: 'Contactos', url: '/dashboard/crm/contactos' }, { title: 'Solicitudes', url: '/dashboard/crm/solicitudes' }, { title: 'Cotizaciones', url: '/dashboard/crm/cotizaciones' }, { title: 'Prospectos (embudo)', url: '/dashboard/crm/prospectos' }, { title: 'Oportunidades', url: '/dashboard/crm/oportunidades' }, { title: 'Actividades', url: '/dashboard/crm/actividades' }, ], }, { title: 'Operaciones', url: '/dashboard/ops/embarques', icon: Ship, items: [ { title: 'Embarques', url: '/dashboard/ops/embarques' }, ], }, { title: 'Facturación', url: '/dashboard/fin/facturas', icon: Receipt, items: [ { title: 'Facturas y cobranza', url: '/dashboard/fin/facturas' }, ], }, { title: 'Compañías', url: '/dashboard/companias', icon: Building, }, { title: 'Workspace', url: '/dashboard/workspace/organizaciones', icon: Building2, items: [ { title: 'Organizaciones', url: '/dashboard/workspace/organizaciones' }, { title: 'Usuarios (invitaciones)', url: '/dashboard/workspace/usuarios' }, ], }, { title: 'Usuarios', url: '/dashboard/users', icon: Users, }, { title: 'Roles y permisos', url: '/dashboard/roles', icon: Shield, }, { title: 'Configuración', url: '/dashboard/settings/general', icon: Settings2, }, ]; } /** * Datos completos del sidebar (navegación + usuario fallback + proyectos). * El usuario real se inyecta desde page.data en app-sidebar.svelte. */ export function getSidebarData() { return { navMain: getNavMain(), projects: [] as { name: string; url: string; icon: any }[], user: { name: '', email: '', username: '', firstName: null, lastName: null, displayName: '', avatarUrl: null, workspaceAvatarUrl: null, legacyAvatarUrl: null, }, }; }