// Ops sidebar navigation + search filter options
// `requires` = capability needed to see this nav item (null = always visible)
// `section` → regroupe l'item sous une SECTION repliable (menu trop long → sous-menus). Sans `section` = épinglé en haut.
// L'ordre + le libellé des sections sont définis dans `navSections`.
export const navSections = [
  { key: 'service', label: 'Service client', icon: 'MessagesSquare' },
  { key: 'terrain', label: 'Terrain',        icon: 'Truck' },
  { key: 'admin',   label: 'Administration', icon: 'Settings' },
]
export const navItems = [
  // ── Épinglés (haut, toujours visibles) ──
  { path: '/',          icon: 'LayoutDashboard', label: 'Accueil',          requires: null }, // accueil universel adapté au rôle (MonAujourdhui) ; sections gestion gated dans la page
  { path: '/rapports',  icon: 'BarChart3',       label: 'Rapports',         requires: 'view_dashboard_kpi' },
  // ── Service client ──
  { path: '/communications', icon: 'MessagesSquare', label: 'Communications', requires: 'view_clients', section: 'service' },
  { path: '/clients',   icon: 'Users',           label: 'Clients',          requires: 'view_clients', section: 'service' },
  { path: '/tickets',   icon: 'Ticket',          label: 'Tickets',          requires: 'view_all_tickets', section: 'service' },
  { path: '/evaluations', icon: 'Star',          label: 'Évaluations',      requires: 'view_clients', section: 'service' },
  { path: '/pipeline',  icon: 'Filter',          label: 'Pipeline (ventes)', requires: 'view_clients', section: 'service' },
  // ── Terrain (effectifs / interventions) — page Dispatch retirée, tout est sur Planification ──
  { path: '/planification', icon: 'CalendarRange', label: 'Planification',  requires: 'view_all_jobs', section: 'terrain' },
  { path: '/rdv',       icon: 'CalendarClock',   label: 'Rendez-vous',      requires: 'view_all_jobs', section: 'terrain' },
  { path: '/copilote',  icon: 'Sparkles',        label: 'Copilote',         requires: 'view_all_jobs', section: 'terrain' },
  { path: '/historique', icon: 'History',        label: 'Historique',       requires: 'view_all_jobs', section: 'terrain' },
  { path: '/taches-pilote', icon: 'Workflow',    label: 'Orchestration (tâches)', requires: 'view_all_jobs', section: 'terrain' },
  { path: '/network',   icon: 'Network',         label: 'Réseau (GPON)',    requires: 'view_settings', section: 'terrain' },
  // ── Administration ── (« Équipe » consolidé dans Paramètres → /settings)
  { path: '/campaigns', icon: 'Gift',            label: 'Campagnes',        requires: 'manage_users', section: 'admin' },
  { path: '/campaigns/pool', icon: 'Award',      label: 'Récompenses',      requires: 'manage_users', section: 'admin' },
  { path: '/evenements', icon: 'PartyPopper',    label: 'Événements',       requires: 'manage_users', section: 'admin' },
  { path: '/conformite-adresses', icon: 'MapPinned', label: 'Conformité adresses', requires: 'view_settings', section: 'admin' },
  { path: '/sync-legacy', icon: 'RefreshCw', label: 'Sync F↔ERPNext', requires: 'view_settings', section: 'admin' },
  { path: '/email-queue', icon: 'Mail',          label: 'File courriels',   requires: 'view_settings', section: 'admin' },
  { path: '/telephony', icon: 'Phone',           label: 'Téléphonie (SIP)', requires: 'view_settings', section: 'admin' },
  { path: '/agent-flows', icon: 'Bot',           label: 'Flux agent IA',    requires: 'view_settings', section: 'admin' },
  { path: '/factures-fournisseurs', icon: 'ReceiptText', label: 'Factures fournisseurs', requires: 'view_settings', section: 'admin' },
  { path: '/sous-traitants', icon: 'HardHat', label: 'Sous-traitants', requires: 'view_settings', section: 'admin' },
  { path: '/facturation/approbations', icon: 'ClipboardCheck', label: 'Approb. facturation', requires: 'view_all_jobs', section: 'admin' },
  { path: '/settings',  icon: 'Settings',        label: 'Paramètres',       requires: 'view_settings', section: 'admin' },
]

export const territoryOptions = [
  { label: 'Gatineau', value: 'Gatineau' },
  { label: 'Ottawa', value: 'Ottawa' },
  { label: 'Aylmer', value: 'Aylmer' },
  { label: 'Hull', value: 'Hull' },
  { label: 'Buckingham', value: 'Buckingham' },
  { label: 'Masson-Angers', value: 'Masson-Angers' },
]

export const statusOptions = [
  { label: 'Actif', value: 'Active' },
  { label: 'Inactif', value: 'Inactive' },
  { label: 'En attente', value: 'Pending' },
]

export const customerTypeOptions = [
  { label: 'Individu', value: 'Individual' },
  { label: 'Entreprise', value: 'Company' },
]
