import type { CommandItem } from './types';

/**
 * Static registry of all navigable pages, settings targets, and quick actions.
 * Mirrors the sidebar structure in AppLayout.tsx buildMenuItems().
 *
 * featureFlag values match SiteSettings boolean keys.
 * requiredRoles restricts visibility to specific user roles.
 */
export const commandRegistry: CommandItem[] = [
  // ── Navigation: Top-level ──────────────────────────────
  {
    id: 'nav-dashboard',
    title: 'Dashboard',
    description: 'Platform overview with key metrics and activity',
    group: 'General',
    path: '/app',
    icon: 'DashboardOutlined',
    keywords: ['home', 'overview', 'summary', 'stats'],
    category: 'navigation',
  },
  {
    id: 'nav-users',
    title: 'Users',
    description: 'Manage user accounts, roles, and permissions',
    group: 'People & Access',
    path: '/app/users',
    icon: 'TeamOutlined',
    keywords: ['people', 'accounts', 'members', 'roles'],
    category: 'navigation',
  },
  {
    id: 'nav-people',
    title: 'People',
    description: 'CRM contacts directory and engagement tracking',
    group: 'People & Access',
    path: '/app/people',
    icon: 'ContactsOutlined',
    keywords: ['crm', 'contacts', 'relationships', 'engagement', 'directory'],
    category: 'navigation',
    featureFlag: 'enablePeople',
    requiredRoles: ['SUPER_ADMIN', 'INFLUENCE_ADMIN', 'MAP_ADMIN'],
  },
  {
    id: 'nav-settings',
    title: 'Settings',
    description: 'Global platform configuration and preferences',
    group: 'General',
    path: '/app/settings',
    icon: 'SettingOutlined',
    keywords: ['config', 'configuration', 'preferences', 'organization'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },

  // ── Navigation: Social ───────────────────────────────
  {
    id: 'nav-social-dashboard',
    title: 'Social Dashboard',
    description: 'Community engagement overview and social stats',
    group: 'Social',
    path: '/app/social',
    icon: 'TeamOutlined',
    keywords: ['social', 'community', 'friends', 'connections', 'engagement'],
    category: 'navigation',
    featureFlag: 'enableSocial',
    requiredRoles: ['SUPER_ADMIN', 'SOCIAL_ADMIN'],
  },
  {
    id: 'nav-social-graph',
    title: 'Social Graph',
    description: 'Visualize connections between community members',
    group: 'Social',
    path: '/app/social/graph',
    icon: 'BranchesOutlined',
    keywords: ['network', 'connections', 'graph', 'relationships', 'visualization'],
    category: 'navigation',
    featureFlag: 'enableSocial',
    requiredRoles: ['SUPER_ADMIN', 'SOCIAL_ADMIN'],
  },
  {
    id: 'nav-social-moderation',
    title: 'Social Moderation',
    description: 'Review flagged content and user reports',
    group: 'Social',
    path: '/app/social/moderation',
    icon: 'MessageOutlined',
    keywords: ['moderation', 'reports', 'flagged', 'content review', 'social moderation'],
    category: 'navigation',
    featureFlag: 'enableSocial',
    requiredRoles: ['SUPER_ADMIN', 'SOCIAL_ADMIN'],
  },

  // ── Navigation: Advocacy ──────────────────────────────
  {
    id: 'nav-campaigns',
    title: 'Campaigns',
    description: 'Create and manage advocacy email campaigns',
    group: 'Advocacy',
    path: '/app/campaigns',
    icon: 'SendOutlined',
    keywords: ['influence', 'advocacy', 'email campaigns', 'letters'],
    category: 'navigation',
    featureFlag: 'enableInfluence',
  },
  {
    id: 'nav-campaign-review',
    title: 'Campaign Review',
    description: 'Moderate and approve pending campaign submissions',
    group: 'Advocacy',
    path: '/app/campaign-moderation',
    icon: 'FileTextOutlined',
    keywords: ['moderation', 'approve', 'pending', 'review campaigns'],
    category: 'navigation',
    featureFlag: 'enableInfluence',
  },
  {
    id: 'nav-representatives',
    title: 'Representatives',
    description: 'Browse and manage elected official data cache',
    group: 'Advocacy',
    path: '/app/representatives',
    icon: 'IdcardOutlined',
    keywords: ['reps', 'politicians', 'elected', 'officials', 'cache'],
    category: 'navigation',
    featureFlag: 'enableInfluence',
  },
  {
    id: 'nav-outgoing-emails',
    title: 'Outgoing Emails',
    description: 'Monitor the advocacy email sending queue',
    group: 'Advocacy',
    path: '/app/email-queue',
    icon: 'MailOutlined',
    keywords: ['queue', 'email queue', 'sent', 'sending', 'bullmq'],
    category: 'navigation',
    featureFlag: 'enableInfluence',
  },
  {
    id: 'nav-responses',
    title: 'Responses',
    description: 'Moderate public responses and feedback',
    group: 'Advocacy',
    path: '/app/responses',
    icon: 'MessageOutlined',
    keywords: ['response wall', 'moderation', 'feedback', 'replies'],
    category: 'navigation',
    featureFlag: 'enableInfluence',
  },
  {
    id: 'nav-effectiveness',
    title: 'Effectiveness',
    description: 'Campaign performance analytics and metrics',
    group: 'Advocacy',
    path: '/app/influence/effectiveness',
    icon: 'LineChartOutlined',
    keywords: ['analytics', 'metrics', 'campaign stats', 'performance'],
    category: 'navigation',
    featureFlag: 'enableInfluence',
  },

  // ── Navigation: Broadcast ─────────────────────────────
  {
    id: 'nav-newsletter',
    title: 'Newsletter',
    description: 'Manage mailing lists and broadcast emails',
    group: 'Broadcast',
    path: '/app/listmonk',
    icon: 'MailOutlined',
    keywords: ['listmonk', 'mailing list', 'subscribers', 'broadcast', 'email marketing'],
    category: 'navigation',
    featureFlag: 'enableNewsletter',
    requiredRoles: ['SUPER_ADMIN', 'BROADCAST_ADMIN'],
  },
  {
    id: 'nav-email-templates',
    title: 'Email Templates',
    description: 'Design reusable email templates',
    group: 'Broadcast',
    path: '/app/email-templates',
    icon: 'FileTextOutlined',
    keywords: ['template', 'email design', 'template editor'],
    category: 'navigation',
    featureFlag: 'enableNewsletter',
  },
  {
    id: 'nav-sms-setup',
    title: 'SMS Setup',
    description: 'Configure the Termux SMS bridge device',
    group: 'Broadcast',
    path: '/app/sms/setup',
    icon: 'SettingOutlined',
    keywords: ['sms config', 'text message', 'termux', 'phone setup'],
    category: 'navigation',
    featureFlag: 'enableSms',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-sms-dashboard',
    title: 'SMS Dashboard',
    description: 'Text messaging overview and delivery stats',
    group: 'Broadcast',
    path: '/app/sms',
    icon: 'PhoneOutlined',
    keywords: ['text messages', 'sms overview', 'sms stats'],
    category: 'navigation',
    featureFlag: 'enableSms',
  },
  {
    id: 'nav-sms-contacts',
    title: 'SMS Contacts',
    description: 'Manage contact lists and phone numbers',
    group: 'Broadcast',
    path: '/app/sms/contacts',
    icon: 'TeamOutlined',
    keywords: ['contact list', 'phone numbers', 'sms recipients'],
    category: 'navigation',
    featureFlag: 'enableSms',
  },
  {
    id: 'nav-sms-campaigns',
    title: 'SMS Campaigns',
    description: 'Create and send bulk text message campaigns',
    group: 'Broadcast',
    path: '/app/sms/campaigns',
    icon: 'SendOutlined',
    keywords: ['text campaigns', 'bulk sms', 'mass text'],
    category: 'navigation',
    featureFlag: 'enableSms',
  },
  {
    id: 'nav-sms-conversations',
    title: 'SMS Threads',
    description: 'View and reply to text message conversations',
    group: 'Broadcast',
    path: '/app/sms/conversations',
    icon: 'MessageOutlined',
    keywords: ['sms replies', 'threads', 'text conversations'],
    category: 'navigation',
    featureFlag: 'enableSms',
  },
  {
    id: 'nav-sms-templates',
    title: 'SMS Templates',
    description: 'Manage reusable text message templates',
    group: 'Broadcast',
    path: '/app/sms/templates',
    icon: 'FileTextOutlined',
    keywords: ['sms template', 'message template', 'canned response'],
    category: 'navigation',
    featureFlag: 'enableSms',
  },

  // ── Navigation: Web ───────────────────────────────────
  {
    id: 'nav-landing-pages',
    title: 'Landing Pages',
    description: 'Build and manage website landing pages',
    group: 'Web',
    path: '/app/pages',
    icon: 'FileTextOutlined',
    keywords: ['pages', 'grapesjs', 'page builder', 'website'],
    category: 'navigation',
    featureFlag: 'enableLandingPages',
  },
  {
    id: 'nav-navigation',
    title: 'Navigation',
    description: 'Configure public site header and menu links',
    group: 'Web',
    path: '/app/navigation',
    icon: 'GlobalOutlined',
    keywords: ['nav', 'menu', 'header links', 'navigation settings'],
    category: 'navigation',
  },
  {
    id: 'nav-documentation',
    title: 'Documentation',
    description: 'Manage MkDocs knowledge base articles',
    group: 'Web',
    path: '/app/docs',
    icon: 'BookOutlined',
    keywords: ['mkdocs', 'docs', 'knowledge base', 'articles'],
    category: 'navigation',
  },
  {
    id: 'nav-docs-analytics',
    title: 'Docs Analytics',
    description: 'View documentation page views and metrics',
    group: 'Web',
    path: '/app/docs/analytics',
    icon: 'BarChartOutlined',
    keywords: ['documentation stats', 'page views', 'docs metrics'],
    category: 'navigation',
  },
  {
    id: 'nav-docs-comments',
    title: 'Docs Comments',
    description: 'Moderate documentation feedback and discussion',
    group: 'Web',
    path: '/app/docs/comments',
    icon: 'MessageOutlined',
    keywords: ['documentation comments', 'feedback', 'discussion'],
    category: 'navigation',
  },
  {
    id: 'nav-docs-settings',
    title: 'Docs Settings',
    description: 'Configure MkDocs site and theme options',
    group: 'Web',
    path: '/app/docs/settings',
    icon: 'SettingOutlined',
    keywords: ['mkdocs config', 'documentation settings'],
    category: 'navigation',
  },
  {
    id: 'nav-code-editor',
    title: 'Code Editor',
    description: 'Open the web-based Code Server IDE',
    group: 'Web',
    path: '/app/code',
    icon: 'CodeOutlined',
    keywords: ['code server', 'vscode', 'ide', 'editor'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },

  // ── Navigation: Map ───────────────────────────────────
  {
    id: 'nav-locations',
    title: 'Locations',
    description: 'Manage addresses, geocoding, and CSV imports',
    group: 'Map',
    path: '/app/map',
    icon: 'EnvironmentOutlined',
    keywords: ['addresses', 'geocoding', 'map', 'places', 'csv import'],
    category: 'navigation',
    featureFlag: 'enableMap',
  },
  {
    id: 'nav-data-quality',
    title: 'Data Quality',
    description: 'Geocoding quality metrics and data health',
    group: 'Map',
    path: '/app/map/data-quality',
    icon: 'BarChartOutlined',
    keywords: ['geocoding quality', 'metrics', 'data dashboard'],
    category: 'navigation',
    featureFlag: 'enableMap',
  },
  {
    id: 'nav-shifts',
    title: 'Shifts',
    description: 'Schedule volunteer shifts and manage signups',
    group: 'Map',
    path: '/app/map/shifts',
    icon: 'ScheduleOutlined',
    keywords: ['volunteer', 'schedule', 'calendar', 'signup', 'canvass shifts'],
    category: 'navigation',
    featureFlag: 'enableMap',
  },
  {
    id: 'nav-areas',
    title: 'Areas',
    description: 'Draw and manage canvassing territory boundaries',
    group: 'Map',
    path: '/app/map/cuts',
    icon: 'ScissorOutlined',
    keywords: ['cuts', 'polygons', 'boundaries', 'zones', 'districts'],
    category: 'navigation',
    featureFlag: 'enableMap',
  },
  {
    id: 'nav-canvassing',
    title: 'Canvassing',
    description: 'View volunteer sessions, visits, and routes',
    group: 'Map',
    path: '/app/map/canvass',
    icon: 'TeamOutlined',
    keywords: ['door knocking', 'volunteers', 'sessions', 'visits'],
    category: 'navigation',
    featureFlag: 'enableMap',
  },
  {
    id: 'nav-map-settings',
    title: 'Map Settings',
    description: 'Configure map center, zoom, and geocoding provider',
    group: 'Map',
    path: '/app/map/settings',
    icon: 'SettingOutlined',
    keywords: ['map config', 'geocoding provider', 'map center'],
    category: 'navigation',
    featureFlag: 'enableMap',
  },

  // ── Navigation: Media ─────────────────────────────────
  {
    id: 'nav-media-library',
    title: 'Library',
    description: 'Upload and manage video files',
    group: 'Media',
    path: '/app/media/library',
    icon: 'FolderOutlined',
    keywords: ['videos', 'uploads', 'media manager', 'video library'],
    category: 'navigation',
    featureFlag: 'enableMediaFeatures',
  },
  {
    id: 'nav-media-analytics',
    title: 'Media Analytics',
    description: 'Video views, watch time, and engagement stats',
    group: 'Media',
    path: '/app/media/analytics',
    icon: 'BarChartOutlined',
    keywords: ['views', 'watch time', 'video stats', 'media metrics'],
    category: 'navigation',
    featureFlag: 'enableMediaFeatures',
  },
  {
    id: 'nav-media-curated',
    title: 'Curated',
    description: 'Manage featured playlists and collections',
    group: 'Media',
    path: '/app/media/curated',
    icon: 'OrderedListOutlined',
    keywords: ['playlists', 'collections', 'featured', 'curated content'],
    category: 'navigation',
    featureFlag: 'enableMediaFeatures',
  },
  {
    id: 'nav-media-moderation',
    title: 'Media Moderation',
    description: 'Review and moderate video comments',
    group: 'Media',
    path: '/app/media/moderation',
    icon: 'MessageOutlined',
    keywords: ['comments', 'review', 'moderate', 'media comments'],
    category: 'navigation',
    featureFlag: 'enableMediaFeatures',
  },
  {
    id: 'nav-gallery-ads',
    title: 'Gallery Ads',
    description: 'Manage banner advertisements in the gallery',
    group: 'Payments',
    path: '/app/payments/ads',
    icon: 'PictureOutlined',
    keywords: ['advertisements', 'banners', 'promotions'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-ad-analytics',
    title: 'Ad Analytics',
    description: 'Track ad impressions, clicks, and performance',
    group: 'Payments',
    path: '/app/payments/ads/analytics',
    icon: 'LineChartOutlined',
    keywords: ['ad performance', 'ad metrics', 'banner stats', 'ad dashboard'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-media-jobs',
    title: 'Processing Jobs',
    description: 'Monitor video encoding and processing tasks',
    group: 'Media',
    path: '/app/media/jobs',
    icon: 'HistoryOutlined',
    keywords: ['ffmpeg', 'encoding', 'job queue', 'processing'],
    category: 'navigation',
    featureFlag: 'enableMediaFeatures',
  },

  // ── Navigation: Payments ──────────────────────────────
  {
    id: 'nav-payments-dashboard',
    title: 'Payments Dashboard',
    description: 'Revenue overview and transaction summary',
    group: 'Payments',
    path: '/app/payments',
    icon: 'DashboardOutlined',
    keywords: ['revenue', 'payments overview', 'transactions'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-plans',
    title: 'Plans',
    description: 'Create subscription plans and pricing tiers',
    group: 'Payments',
    path: '/app/payments/plans',
    icon: 'TagOutlined',
    keywords: ['subscriptions', 'pricing', 'tiers', 'membership'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-subscribers',
    title: 'Subscribers',
    description: 'View and manage paying subscribers',
    group: 'Payments',
    path: '/app/payments/subscribers',
    icon: 'CrownOutlined',
    keywords: ['members', 'paying users', 'subscriptions'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-products',
    title: 'Products',
    description: 'Manage store products and merchandise',
    group: 'Payments',
    path: '/app/payments/products',
    icon: 'ShoppingOutlined',
    keywords: ['store', 'shop', 'items', 'merchandise'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-donation-pages',
    title: 'Donation Pages',
    description: 'Create fundraising and donation pages',
    group: 'Payments',
    path: '/app/payments/donation-pages',
    icon: 'HeartOutlined',
    keywords: ['donate', 'fundraising', 'giving'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-donation-orders',
    title: 'Donation Orders',
    description: 'Track received donations and transaction history',
    group: 'Payments',
    path: '/app/payments/donations',
    icon: 'DollarOutlined',
    keywords: ['donations received', 'donation history', 'transaction log'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-payment-settings',
    title: 'Payment Settings',
    description: 'Configure payment gateway and Stripe integration',
    group: 'Payments',
    path: '/app/payments/settings',
    icon: 'SettingOutlined',
    keywords: ['stripe', 'payment config', 'gateway'],
    category: 'navigation',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },

  // ── Navigation: Services (SUPER_ADMIN only) ───────────
  {
    id: 'nav-tunnel',
    title: 'Tunnel',
    description: 'Manage Pangolin reverse tunnel for public access',
    group: 'Services',
    path: '/app/tunnel',
    icon: 'CloudServerOutlined',
    keywords: ['pangolin', 'newt', 'tunnel', 'reverse proxy', 'expose'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-monitoring',
    title: 'Monitoring',
    description: 'Prometheus metrics, Grafana dashboards, and alerts',
    group: 'Services',
    path: '/app/observability',
    icon: 'LineChartOutlined',
    keywords: ['prometheus', 'grafana', 'alertmanager', 'observability', 'metrics'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-database',
    title: 'Database',
    description: 'Browse database tables with NocoDB',
    group: 'Services',
    path: '/app/services/nocodb',
    icon: 'DatabaseOutlined',
    keywords: ['nocodb', 'data browser', 'tables', 'sql'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-vault',
    title: 'Vault',
    description: 'Vaultwarden password manager for the team',
    group: 'Services',
    path: '/app/services/vaultwarden',
    icon: 'LockOutlined',
    keywords: ['vaultwarden', 'passwords', 'secrets', 'bitwarden'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-mailhog',
    title: 'MailHog',
    description: 'Capture and inspect test emails in development',
    group: 'Services',
    path: '/app/services/mailhog',
    icon: 'MailOutlined',
    keywords: ['email capture', 'test emails', 'development mail'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-workflows',
    title: 'Workflows',
    description: 'n8n workflow automation and integrations',
    group: 'Services',
    path: '/app/services/n8n',
    icon: 'ApiOutlined',
    keywords: ['n8n', 'automation', 'integrations', 'workflows'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-git',
    title: 'Git',
    description: 'Gitea self-hosted Git repositories',
    group: 'Services',
    path: '/app/services/gitea',
    icon: 'BranchesOutlined',
    keywords: ['gitea', 'repository', 'source code', 'version control'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-whiteboard',
    title: 'Whiteboard',
    description: 'Excalidraw collaborative drawing board',
    group: 'Services',
    path: '/app/services/excalidraw',
    icon: 'EditOutlined',
    keywords: ['excalidraw', 'drawing', 'diagrams', 'sketch'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-team-chat',
    title: 'Team Chat',
    description: 'Rocket.Chat team messaging and channels',
    group: 'Services',
    path: '/app/services/rocketchat',
    icon: 'MessageOutlined',
    keywords: ['rocketchat', 'chat', 'messaging', 'communication'],
    category: 'navigation',
    featureFlag: 'enableChat',
  },
  {
    id: 'nav-events',
    title: 'Events',
    description: 'Gancio event calendar and scheduling',
    group: 'Services',
    path: '/app/services/gancio',
    icon: 'CalendarOutlined',
    keywords: ['gancio', 'events', 'calendar', 'activities'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-jitsi',
    title: 'Video Meetings',
    description: 'Jitsi Meet video conferencing setup',
    group: 'Services',
    path: '/app/services/jitsi',
    icon: 'PlaySquareOutlined',
    keywords: ['jitsi', 'video call', 'conference', 'meeting', 'webrtc'],
    category: 'navigation',
    featureFlag: 'enableMeet',
    requiredRoles: ['SUPER_ADMIN'],
  },
  {
    id: 'nav-qr-codes',
    title: 'QR Codes',
    description: 'Generate QR code images for links',
    group: 'Services',
    path: '/app/services/miniqr',
    icon: 'QrcodeOutlined',
    keywords: ['qr generator', 'mini qr', 'barcode'],
    category: 'navigation',
    requiredRoles: ['SUPER_ADMIN'],
  },

  // ── Settings deep links ───────────────────────────────
  {
    id: 'settings-general',
    title: 'General Settings',
    description: 'Organization name, branding, and basic config',
    group: 'Settings',
    path: '/app/settings',
    icon: 'SettingOutlined',
    keywords: ['organization name', 'branding', 'logo', 'general config'],
    category: 'settings',
    requiredRoles: ['SUPER_ADMIN'],
    navigationState: { activeTab: 'general' },
  },
  {
    id: 'settings-features',
    title: 'Feature Flags',
    description: 'Toggle platform modules on or off',
    group: 'Settings',
    path: '/app/settings',
    icon: 'SettingOutlined',
    keywords: ['toggle', 'enable', 'disable', 'feature flags', 'modules'],
    category: 'settings',
    requiredRoles: ['SUPER_ADMIN'],
    navigationState: { activeTab: 'features' },
  },
  {
    id: 'settings-theme',
    title: 'Theme Settings',
    description: 'Customize colors, appearance, and branding',
    group: 'Settings',
    path: '/app/settings',
    icon: 'SettingOutlined',
    keywords: ['colors', 'appearance', 'dark mode', 'branding', 'primary color'],
    category: 'settings',
    requiredRoles: ['SUPER_ADMIN'],
    navigationState: { activeTab: 'theme' },
  },
  {
    id: 'settings-email',
    title: 'Email Settings',
    description: 'SMTP server and email sender configuration',
    group: 'Settings',
    path: '/app/settings',
    icon: 'MailOutlined',
    keywords: ['smtp', 'email config', 'mail server', 'sender'],
    category: 'settings',
    requiredRoles: ['SUPER_ADMIN'],
    navigationState: { activeTab: 'email' },
  },
  {
    id: 'settings-provisioning',
    title: 'User Provisioning',
    description: 'Auto-create accounts in Gitea, Vaultwarden, and more',
    group: 'Settings',
    path: '/app/settings',
    icon: 'TeamOutlined',
    keywords: ['provision', 'auto-create', 'service accounts', 'gitea', 'vaultwarden'],
    category: 'settings',
    requiredRoles: ['SUPER_ADMIN'],
    navigationState: { activeTab: 'provisioning' },
  },
  {
    id: 'settings-navigation',
    title: 'Navigation Settings',
    description: 'Configure public site header links and menus',
    group: 'Settings',
    path: '/app/navigation',
    icon: 'GlobalOutlined',
    keywords: ['header links', 'nav config', 'menu items'],
    category: 'settings',
  },
  {
    id: 'settings-map',
    title: 'Map Settings',
    description: 'Set map center, zoom, and geocoding provider',
    group: 'Settings',
    path: '/app/map/settings',
    icon: 'EnvironmentOutlined',
    keywords: ['map center', 'geocoding provider', 'map config'],
    category: 'settings',
    featureFlag: 'enableMap',
  },
  {
    id: 'settings-payments',
    title: 'Payment Settings',
    description: 'Stripe gateway and payment configuration',
    group: 'Settings',
    path: '/app/payments/settings',
    icon: 'DollarOutlined',
    keywords: ['stripe', 'payment gateway', 'payment config'],
    category: 'settings',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
  },

  // ── Help & Tours ────────────────────────────────────────
  {
    id: 'action-learning-tours',
    title: 'Learning Tours',
    description: 'Browse interactive tutorials for each section of the admin',
    group: 'Actions',
    path: '',
    icon: 'QuestionCircleOutlined',
    keywords: ['tour', 'help', 'learn', 'tutorial', 'guide', 'onboarding', 'walkthrough'],
    category: 'action',
  },

  // ── Quick actions ─────────────────────────────────────
  {
    id: 'action-create-campaign',
    title: 'Create Campaign',
    description: 'Start a new advocacy email campaign',
    group: 'Actions',
    path: '/app/campaigns',
    icon: 'SendOutlined',
    keywords: ['new campaign', 'add campaign'],
    category: 'action',
    featureFlag: 'enableInfluence',
    navigationState: { openCreate: true },
  },
  {
    id: 'action-add-location',
    title: 'Add Location',
    description: 'Add a new address to the map database',
    group: 'Actions',
    path: '/app/map',
    icon: 'EnvironmentOutlined',
    keywords: ['new location', 'add address', 'create location'],
    category: 'action',
    featureFlag: 'enableMap',
    navigationState: { openCreate: true },
  },
  {
    id: 'action-new-shift',
    title: 'New Shift',
    description: 'Schedule a new volunteer shift',
    group: 'Actions',
    path: '/app/map/shifts',
    icon: 'ScheduleOutlined',
    keywords: ['create shift', 'add shift', 'schedule shift'],
    category: 'action',
    featureFlag: 'enableMap',
    navigationState: { openCreate: true },
  },
  {
    id: 'action-new-landing-page',
    title: 'New Landing Page',
    description: 'Create a new landing page with the editor',
    group: 'Actions',
    path: '/app/pages',
    icon: 'FileTextOutlined',
    keywords: ['create page', 'add page', 'new page'],
    category: 'action',
    featureFlag: 'enableLandingPages',
    navigationState: { openCreate: true },
  },
  {
    id: 'action-new-email-template',
    title: 'New Email Template',
    description: 'Create a reusable email template',
    group: 'Actions',
    path: '/app/email-templates',
    icon: 'FileTextOutlined',
    keywords: ['create template', 'add template'],
    category: 'action',
    featureFlag: 'enableNewsletter',
    navigationState: { openCreate: true },
  },
  {
    id: 'action-new-product',
    title: 'New Product',
    description: 'Add a new product to the store',
    group: 'Actions',
    path: '/app/payments/products',
    icon: 'ShoppingOutlined',
    keywords: ['create product', 'add product', 'new item'],
    category: 'action',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
    navigationState: { openCreate: true },
  },
  {
    id: 'action-add-contact',
    title: 'Add Contact',
    description: 'Create a new CRM contact record',
    group: 'Actions',
    path: '/app/people',
    icon: 'ContactsOutlined',
    keywords: ['new contact', 'add person', 'create contact', 'crm'],
    category: 'action',
    featureFlag: 'enablePeople',
    requiredRoles: ['SUPER_ADMIN', 'INFLUENCE_ADMIN', 'MAP_ADMIN'],
    navigationState: { openCreate: true },
  },
  {
    id: 'action-new-plan',
    title: 'New Plan',
    description: 'Create a new subscription pricing plan',
    group: 'Actions',
    path: '/app/payments/plans',
    icon: 'TagOutlined',
    keywords: ['create plan', 'add plan', 'new subscription', 'pricing tier'],
    category: 'action',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
    navigationState: { openCreate: true },
  },
  {
    id: 'action-new-donation-page',
    title: 'New Donation Page',
    description: 'Create a new fundraising page',
    group: 'Actions',
    path: '/app/payments/donation-pages',
    icon: 'HeartOutlined',
    keywords: ['create donation page', 'fundraising', 'giving page'],
    category: 'action',
    featureFlag: 'enablePayments',
    requiredRoles: ['SUPER_ADMIN'],
    navigationState: { openCreate: true },
  },
  {
    id: 'action-new-sms-campaign',
    title: 'New SMS Campaign',
    description: 'Start a new bulk text message campaign',
    group: 'Actions',
    path: '/app/sms/campaigns',
    icon: 'PhoneOutlined',
    keywords: ['create sms campaign', 'text campaign', 'bulk sms', 'new text'],
    category: 'action',
    featureFlag: 'enableSms',
    navigationState: { openCreate: true },
  },
  {
    id: 'action-new-sms-template',
    title: 'New SMS Template',
    description: 'Create a reusable text message template',
    group: 'Actions',
    path: '/app/sms/templates',
    icon: 'FileTextOutlined',
    keywords: ['create sms template', 'new message template', 'canned response'],
    category: 'action',
    featureFlag: 'enableSms',
    navigationState: { openCreate: true },
  },
];
