<?php

namespace Config;

use CodeIgniter\Config\BaseConfig;

class Navigation extends BaseConfig
{
    /**
     * Module sidebar navigation. Each module is shown when the current URI
     * matches one of its prefixes.
     *
     * @var array<string, array{label: string, prefixes: list<string>, groups: list<array{label: string, icon: string, items: list<array{label: string, path: string, icon: string, exact?: bool}>}>}>
     */
    public array $modules = [
        // Listed first so report URL prefixes win over domain modules in the sidebar.
        'reports' => [
            'label'    => 'Reports',
            'prefixes' => [
                'reports',
                'payroll/reports',
                'attendance/monthly',
                'attendance/late',
                'attendance/early-exit',
                'attendance/overtime',
                'sale/reports',
                'inventory/reports',
                'procurement/reports',
                'accounting/reports',
                'accounting/tax-reports',
                'accounting/receivables-aging',
                'accounting/payables-aging',
                'operations/work-orders/completion-reports',
                'transport/reports',
            ],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'All Reports', 'path' => 'reports', 'icon' => 'fa-chart-pie', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Attendance',
                    'icon'  => 'fa-fingerprint',
                    'items' => [
                        ['label' => 'Monthly Report', 'path' => 'attendance/monthly', 'icon' => 'fa-calendar-check'],
                        ['label' => 'Late Arrivals', 'path' => 'attendance/late', 'icon' => 'fa-clock'],
                        ['label' => 'Early Exits', 'path' => 'attendance/early-exit', 'icon' => 'fa-person-walking-arrow-right'],
                        ['label' => 'Overtime', 'path' => 'attendance/overtime', 'icon' => 'fa-business-time'],
                    ],
                ],
                [
                    'label' => 'Payroll',
                    'icon'  => 'fa-money-check-dollar',
                    'items' => [
                        ['label' => 'Payroll Summary', 'path' => 'payroll/reports/summary', 'icon' => 'fa-chart-pie'],
                        ['label' => 'SIO Report', 'path' => 'payroll/reports/sio', 'icon' => 'fa-shield-halved'],
                        ['label' => 'EOSB Report', 'path' => 'payroll/reports/eosb', 'icon' => 'fa-piggy-bank'],
                    ],
                ],
                [
                    'label' => 'Sales & CRM',
                    'icon'  => 'fa-chart-line',
                    'items' => [
                        ['label' => 'Sales Performance', 'path' => 'sale/reports/sales-performance', 'icon' => 'fa-chart-line'],
                        ['label' => 'Lead Conversion', 'path' => 'sale/reports/lead-conversion', 'icon' => 'fa-filter'],
                        ['label' => 'Revenue Forecast', 'path' => 'sale/reports/revenue-forecast', 'icon' => 'fa-chart-area'],
                        ['label' => 'Customer Analysis', 'path' => 'sale/reports/customer-analysis', 'icon' => 'fa-users'],
                        ['label' => 'Sales Reports', 'path' => 'sale/reports/sales-reports', 'icon' => 'fa-file-invoice'],
                    ],
                ],
                [
                    'label' => 'Inventory',
                    'icon'  => 'fa-boxes-stacked',
                    'items' => [
                        ['label' => 'Inventory Reports', 'path' => 'inventory/reports', 'icon' => 'fa-chart-line'],
                    ],
                ],
                [
                    'label' => 'Procurement',
                    'icon'  => 'fa-cart-shopping',
                    'items' => [
                        ['label' => 'Procurement Reports', 'path' => 'procurement/reports', 'icon' => 'fa-chart-line'],
                    ],
                ],
                [
                    'label' => 'Accounting',
                    'icon'  => 'fa-calculator',
                    'items' => [
                        ['label' => 'Financial Reports', 'path' => 'accounting/reports', 'icon' => 'fa-chart-line', 'exact' => true],
                        ['label' => 'Trial Balance', 'path' => 'accounting/reports/trial-balance', 'icon' => 'fa-table'],
                        ['label' => 'General Ledger', 'path' => 'accounting/reports/general-ledger', 'icon' => 'fa-book-open'],
                        ['label' => 'Profit & Loss', 'path' => 'accounting/reports/profit-and-loss', 'icon' => 'fa-chart-area'],
                        ['label' => 'Balance Sheet', 'path' => 'accounting/reports/balance-sheet', 'icon' => 'fa-file-invoice-dollar'],
                        ['label' => 'Cash Flow', 'path' => 'accounting/reports/cash-flow', 'icon' => 'fa-water'],
                        ['label' => 'Tax Reports', 'path' => 'accounting/tax-reports', 'icon' => 'fa-percent'],
                        ['label' => 'Receivables Aging', 'path' => 'accounting/receivables-aging', 'icon' => 'fa-clock'],
                        ['label' => 'Payables Aging', 'path' => 'accounting/payables-aging', 'icon' => 'fa-clock'],
                    ],
                ],
                [
                    'label' => 'Operations',
                    'icon'  => 'fa-clipboard-list',
                    'items' => [
                        ['label' => 'Completion Reports', 'path' => 'operations/work-orders/completion-reports', 'icon' => 'fa-file-circle-check'],
                    ],
                ],
                [
                    'label' => 'Transport',
                    'icon'  => 'fa-truck',
                    'items' => [
                        ['label' => 'Transport Reports', 'path' => 'transport/reports', 'icon' => 'fa-chart-line'],
                    ],
                ],
            ],
        ],
        'transport' => [
            'label'    => 'Transport',
            'prefixes' => ['transport'],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'Dashboard', 'path' => 'transport', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Fleet',
                    'icon'  => 'fa-truck',
                    'items' => [
                        ['label' => 'Vehicles', 'path' => 'transport/vehicles', 'icon' => 'fa-truck'],
                        ['label' => 'Drivers', 'path' => 'transport/drivers', 'icon' => 'fa-id-card'],
                    ],
                ],
                [
                    'label' => 'Network',
                    'icon'  => 'fa-map-location-dot',
                    'items' => [
                        ['label' => 'Locations', 'path' => 'transport/locations', 'icon' => 'fa-location-dot'],
                        ['label' => 'Routes', 'path' => 'transport/routes', 'icon' => 'fa-route'],
                        ['label' => 'Fleet Map', 'path' => 'transport/maps', 'icon' => 'fa-map', 'exact' => true],
                        ['label' => 'Map Settings', 'path' => 'transport/maps/settings', 'icon' => 'fa-gear'],
                    ],
                ],
                [
                    'label' => 'Operations',
                    'icon'  => 'fa-calendar-days',
                    'items' => [
                        ['label' => 'Scheduling', 'path' => 'transport/scheduling', 'icon' => 'fa-calendar-check'],
                        ['label' => 'Driver Schedule Export', 'path' => 'transport/scheduling/export', 'icon' => 'fa-file-export'],
                    ],
                ],
                [
                    'label' => 'AI Planning',
                    'icon'  => 'fa-wand-magic-sparkles',
                    'items' => [
                        ['label' => 'AI Transport Plans', 'path' => 'transport/ai/plans', 'icon' => 'fa-wand-magic-sparkles'],
                        ['label' => 'Contract Sites', 'path' => 'transport/ai/contract-sites', 'icon' => 'fa-building-flag'],
                        ['label' => 'AI Settings', 'path' => 'transport/ai/settings', 'icon' => 'fa-sliders'],
                    ],
                ],
                [
                    'label' => 'Reports',
                    'icon'  => 'fa-chart-pie',
                    'items' => [
                        ['label' => 'Transport Reports', 'path' => 'transport/reports', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
            ],
        ],
        'hrm' => [
            'label'    => 'HRM',
            'prefixes' => ['hrm', 'employees', 'departments', 'leave', 'holidays', 'attendance', 'payroll', 'assets', 'documents', 'scheduling'],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'Dashboard', 'path' => 'hrm', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Directory',
                    'icon'  => 'fa-id-badge',
                    'items' => [
                        ['label' => 'Employees', 'path' => 'employees', 'icon' => 'fa-users'],
                        ['label' => 'Departments', 'path' => 'departments', 'icon' => 'fa-sitemap'],
                    ],
                ],
                [
                    'label' => 'Scheduling',
                    'icon'  => 'fa-calendar-week',
                    'items' => [
                        ['label' => 'Staff Scheduling', 'path' => 'scheduling/staff', 'icon' => 'fa-user-clock'],
                        ['label' => 'Shift Planning', 'path' => 'scheduling/shifts', 'icon' => 'fa-clock-rotate-left'],
                        ['label' => 'Calendar', 'path' => 'scheduling/calendar', 'icon' => 'fa-calendar'],
                        ['label' => 'Assignments', 'path' => 'scheduling/assignments', 'icon' => 'fa-list-check'],
                    ],
                ],
                [
                    'label' => 'Assets',
                    'icon'  => 'fa-boxes-stacked',
                    'items' => [
                        ['label' => 'Asset Assignments', 'path' => 'assets/assignments', 'icon' => 'fa-hand-holding'],
                        ['label' => 'Asset Types', 'path' => 'assets/types', 'icon' => 'fa-list'],
                    ],
                ],
                [
                    'label' => 'Documents',
                    'icon'  => 'fa-folder-open',
                    'items' => [
                        ['label' => 'Employee Documents', 'path' => 'documents', 'icon' => 'fa-file-lines', 'exact' => true],
                        ['label' => 'Expiry Tracker', 'path' => 'documents/expiry', 'icon' => 'fa-clock'],
                        ['label' => 'Document Types', 'path' => 'documents/types', 'icon' => 'fa-list'],
                    ],
                ],
                [
                    'label' => 'Attendance',
                    'icon'  => 'fa-fingerprint',
                    'items' => [
                        ['label' => 'Daily Board', 'path' => 'attendance', 'icon' => 'fa-table-columns', 'exact' => true],
                        ['label' => 'Manual Entry', 'path' => 'attendance/manual', 'icon' => 'fa-keyboard'],
                        ['label' => 'Corrections', 'path' => 'attendance/corrections', 'icon' => 'fa-pen-to-square'],
                        ['label' => 'Shifts', 'path' => 'attendance/shifts', 'icon' => 'fa-clock-rotate-left', 'exact' => true],
                        ['label' => 'Shift Assignments', 'path' => 'attendance/shifts/assignments', 'icon' => 'fa-user-clock'],
                    ],
                ],
                [
                    'label' => 'Leave',
                    'icon'  => 'fa-calendar-days',
                    'items' => [
                        ['label' => 'Leave Types', 'path' => 'leave/types', 'icon' => 'fa-list'],
                        ['label' => 'Leave Balances', 'path' => 'leave/balances', 'icon' => 'fa-scale-balanced'],
                        ['label' => 'Leave Requests', 'path' => 'leave/requests', 'icon' => 'fa-file-lines'],
                        ['label' => 'Leave Calendar', 'path' => 'leave/calendar', 'icon' => 'fa-calendar'],
                        ['label' => 'Holidays', 'path' => 'holidays', 'icon' => 'fa-umbrella-beach'],
                    ],
                ],
                [
                    'label' => 'Payroll',
                    'icon'  => 'fa-money-check-dollar',
                    'items' => [
                        ['label' => 'Payroll Runs', 'path' => 'payroll/runs', 'icon' => 'fa-calendar-check'],
                        ['label' => 'Salary Structures', 'path' => 'payroll/salary', 'icon' => 'fa-coins'],
                        ['label' => 'Payslips', 'path' => 'payroll/payslips', 'icon' => 'fa-receipt'],
                        ['label' => 'Final Settlements', 'path' => 'payroll/settlements', 'icon' => 'fa-hand-holding-dollar'],
                        ['label' => 'Payroll Settings', 'path' => 'payroll/settings', 'icon' => 'fa-sliders'],
                    ],
                ],
            ],
        ],
        'contracts' => [
            'label'    => 'Contracts',
            'prefixes' => ['contracts'],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'Dashboard', 'path' => 'contracts', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Customers',
                    'icon'  => 'fa-building-user',
                    'items' => [
                        ['label' => 'Customers', 'path' => 'contracts/customers', 'icon' => 'fa-building'],
                    ],
                ],
                [
                    'label' => 'Sites / Locations',
                    'icon'  => 'fa-location-dot',
                    'items' => [
                        ['label' => 'Customer Sites', 'path' => 'contracts/sites', 'icon' => 'fa-store', 'exact' => true],
                        ['label' => 'Site Details', 'path' => 'contracts/sites/details', 'icon' => 'fa-map-location-dot'],
                        ['label' => 'Site Contacts', 'path' => 'contracts/sites/contacts', 'icon' => 'fa-address-book'],
                        ['label' => 'Site History', 'path' => 'contracts/sites/history', 'icon' => 'fa-clock-rotate-left'],
                    ],
                ],
                [
                    'label' => 'Contracts',
                    'icon'  => 'fa-file-contract',
                    'items' => [
                        ['label' => 'Active Contracts', 'path' => 'contracts/active', 'icon' => 'fa-file-signature'],
                        ['label' => 'Contract Schedule', 'path' => 'contracts/schedule', 'icon' => 'fa-calendar-days'],
                        ['label' => 'Renewals', 'path' => 'contracts/renewals', 'icon' => 'fa-rotate'],
                        ['label' => 'Expiry Alerts', 'path' => 'contracts/expiry-alerts', 'icon' => 'fa-bell'],
                    ],
                ],
            ],
        ],
        'inventory' => [
            'label'    => 'Inventory',
            'prefixes' => ['inventory'],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'Dashboard', 'path' => 'inventory', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Catalog',
                    'icon'  => 'fa-box',
                    'items' => [
                        ['label' => 'Products', 'path' => 'inventory/products', 'icon' => 'fa-boxes-stacked'],
                        ['label' => 'Categories', 'path' => 'inventory/categories', 'icon' => 'fa-folder'],
                        ['label' => 'Brands', 'path' => 'inventory/brands', 'icon' => 'fa-tags'],
                        ['label' => 'Units of Measure', 'path' => 'inventory/units-of-measure', 'icon' => 'fa-ruler'],
                    ],
                ],
                [
                    'label' => 'Warehousing',
                    'icon'  => 'fa-warehouse',
                    'items' => [
                        ['label' => 'Warehouses', 'path' => 'inventory/warehouses', 'icon' => 'fa-building'],
                        ['label' => 'Stock', 'path' => 'inventory/stock', 'icon' => 'fa-cubes'],
                        ['label' => 'Stock Transfers', 'path' => 'inventory/stock-transfers', 'icon' => 'fa-right-left'],
                        ['label' => 'Stock Adjustments', 'path' => 'inventory/stock-adjustments', 'icon' => 'fa-sliders'],
                        ['label' => 'Stock Counts', 'path' => 'inventory/stock-counts', 'icon' => 'fa-clipboard-list'],
                        ['label' => 'Reorder Levels', 'path' => 'inventory/reorder-levels', 'icon' => 'fa-bell'],
                    ],
                ],
                [
                    'label' => 'Tracking',
                    'icon'  => 'fa-barcode',
                    'items' => [
                        ['label' => 'Serial Numbers', 'path' => 'inventory/serial-numbers', 'icon' => 'fa-hashtag'],
                        ['label' => 'Batch Tracking', 'path' => 'inventory/batches', 'icon' => 'fa-layer-group'],
                        ['label' => 'Barcode & Labels', 'path' => 'inventory/barcodes', 'icon' => 'fa-barcode'],
                    ],
                ],
                [
                    'label' => 'Assets',
                    'icon'  => 'fa-laptop',
                    'items' => [
                        ['label' => 'Asset Inventory', 'path' => 'inventory/asset-inventory', 'icon' => 'fa-laptop'],
                    ],
                ],
            ],
        ],
        'accounting' => [
            'label'    => 'Accounting',
            'prefixes' => ['accounting'],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'Dashboard', 'path' => 'accounting', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'General Ledger',
                    'icon'  => 'fa-book',
                    'items' => [
                        ['label' => 'Chart of Accounts', 'path' => 'accounting/chart-of-accounts', 'icon' => 'fa-sitemap'],
                        ['label' => 'Journal Entries', 'path' => 'accounting/journal-entries', 'icon' => 'fa-book'],
                    ],
                ],
                [
                    'label' => 'Receivables',
                    'icon'  => 'fa-file-invoice-dollar',
                    'items' => [
                        ['label' => 'Customer Invoices', 'path' => 'accounting/customer-invoices', 'icon' => 'fa-file-invoice'],
                        ['label' => 'Receipts', 'path' => 'accounting/receipts', 'icon' => 'fa-receipt'],
                        ['label' => 'Credit Notes', 'path' => 'accounting/credit-notes', 'icon' => 'fa-file-circle-minus'],
                        ['label' => 'Customer Statements', 'path' => 'accounting/customer-statements', 'icon' => 'fa-file-lines'],
                    ],
                ],
                [
                    'label' => 'Payables',
                    'icon'  => 'fa-hand-holding-dollar',
                    'items' => [
                        ['label' => 'Supplier Bills', 'path' => 'accounting/supplier-bills', 'icon' => 'fa-file-invoice'],
                        ['label' => 'Payments', 'path' => 'accounting/payments', 'icon' => 'fa-money-check-dollar'],
                        ['label' => 'Debit Notes', 'path' => 'accounting/debit-notes', 'icon' => 'fa-file-circle-plus'],
                        ['label' => 'Supplier Statements', 'path' => 'accounting/supplier-statements', 'icon' => 'fa-file-lines'],
                    ],
                ],
                [
                    'label' => 'Banking',
                    'icon'  => 'fa-building-columns',
                    'items' => [
                        ['label' => 'Bank Accounts', 'path' => 'accounting/bank-accounts', 'icon' => 'fa-building-columns'],
                        ['label' => 'Cash Accounts', 'path' => 'accounting/cash-accounts', 'icon' => 'fa-money-bill'],
                        ['label' => 'Bank Transfers', 'path' => 'accounting/bank-transfers', 'icon' => 'fa-right-left'],
                        ['label' => 'Bank Reconciliation', 'path' => 'accounting/bank-reconciliations', 'icon' => 'fa-scale-balanced'],
                        ['label' => 'Cheques', 'path' => 'accounting/cheques', 'icon' => 'fa-money-check'],
                    ],
                ],
                [
                    'label' => 'Assets',
                    'icon'  => 'fa-warehouse',
                    'items' => [
                        ['label' => 'Fixed Assets', 'path' => 'accounting/fixed-assets', 'icon' => 'fa-building'],
                        ['label' => 'Asset Categories', 'path' => 'accounting/asset-categories', 'icon' => 'fa-tags'],
                        ['label' => 'Depreciation', 'path' => 'accounting/depreciation', 'icon' => 'fa-chart-line'],
                        ['label' => 'Asset Disposal', 'path' => 'accounting/asset-disposals', 'icon' => 'fa-trash-can'],
                    ],
                ],
                [
                    'label' => 'Taxes',
                    'icon'  => 'fa-percent',
                    'items' => [
                        ['label' => 'Tax Rates', 'path' => 'accounting/tax-rates', 'icon' => 'fa-percent'],
                        ['label' => 'VAT Returns', 'path' => 'accounting/vat-returns', 'icon' => 'fa-file-invoice'],
                    ],
                ],
                [
                    'label' => 'Operations',
                    'icon'  => 'fa-wallet',
                    'items' => [
                        ['label' => 'Payment Vouchers', 'path' => 'accounting/payment-vouchers', 'icon' => 'fa-money-check-dollar'],
                        ['label' => 'Receipt Vouchers', 'path' => 'accounting/receipt-vouchers', 'icon' => 'fa-receipt'],
                        ['label' => 'Expenses', 'path' => 'accounting/expenses', 'icon' => 'fa-wallet'],
                        ['label' => 'Budgets', 'path' => 'accounting/budgets', 'icon' => 'fa-chart-pie'],
                    ],
                ],
            ],
        ],
        'operations' => [
            'label'    => 'Operations',
            'prefixes' => ['operations'],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'Dashboard', 'path' => 'operations', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Work Orders',
                    'icon'  => 'fa-clipboard-list',
                    'items' => [
                        ['label' => 'Create Work Order', 'path' => 'operations/work-orders/create', 'icon' => 'fa-plus'],
                        ['label' => 'Assign Staff', 'path' => 'operations/work-orders/assign-staff', 'icon' => 'fa-user-plus'],
                        ['label' => 'Assign Equipment', 'path' => 'operations/work-orders/assign-equipment', 'icon' => 'fa-screwdriver-wrench'],
                        ['label' => 'Status Tracking', 'path' => 'operations/work-orders/status-tracking', 'icon' => 'fa-list-check'],
                    ],
                ],
                [
                    'label' => 'Tasks',
                    'icon'  => 'fa-list-check',
                    'items' => [
                        ['label' => 'Task Management', 'path' => 'operations/tasks', 'icon' => 'fa-list', 'exact' => true],
                        ['label' => 'Checklists', 'path' => 'operations/tasks/checklists', 'icon' => 'fa-square-check'],
                        ['label' => 'Priorities', 'path' => 'operations/tasks/priorities', 'icon' => 'fa-arrow-up-wide-short'],
                        ['label' => 'Deadlines', 'path' => 'operations/tasks/deadlines', 'icon' => 'fa-calendar-day'],
                    ],
                ],
                [
                    'label' => 'Approvals',
                    'icon'  => 'fa-thumbs-up',
                    'items' => [
                        ['label' => 'New Request', 'path' => 'operations/approvals/requests/create', 'icon' => 'fa-paper-plane'],
                        ['label' => 'My Requests', 'path' => 'operations/approvals/my-requests', 'icon' => 'fa-inbox'],
                        ['label' => 'Requests for Me', 'path' => 'operations/approvals/inbox', 'icon' => 'fa-user-check'],
                        ['label' => 'Expense Approval', 'path' => 'operations/approvals/expenses', 'icon' => 'fa-receipt'],
                        ['label' => 'Work Approval', 'path' => 'operations/approvals/work-orders', 'icon' => 'fa-clipboard-check'],
                        ['label' => 'Purchase Approval', 'path' => 'operations/approvals/purchases', 'icon' => 'fa-cart-shopping'],
                        ['label' => 'Leave Approval', 'path' => 'operations/approvals/leave', 'icon' => 'fa-plane-departure'],
                    ],
                ],
                [
                    'label' => 'Field Service',
                    'icon'  => 'fa-truck-field',
                    'items' => [
                        ['label' => 'Service Visits', 'path' => 'operations/field-service/service-visits', 'icon' => 'fa-map-location-dot'],
                        ['label' => 'Technician Jobs', 'path' => 'operations/field-service/technician-jobs', 'icon' => 'fa-user-gear'],
                        ['label' => 'Inspection Reports', 'path' => 'operations/field-service/inspection-reports', 'icon' => 'fa-file-circle-check'],
                        ['label' => 'Customer Signatures', 'path' => 'operations/field-service/customer-signatures', 'icon' => 'fa-signature'],
                    ],
                ],
                [
                    'label' => 'Quality Control',
                    'icon'  => 'fa-clipboard-check',
                    'items' => [
                        ['label' => 'Inspections', 'path' => 'operations/quality-control/inspections', 'icon' => 'fa-magnifying-glass'],
                        ['label' => 'Audit Checklists', 'path' => 'operations/quality-control/audit-checklists', 'icon' => 'fa-list-check'],
                        ['label' => 'Performance Scores', 'path' => 'operations/quality-control/performance-scores', 'icon' => 'fa-chart-simple'],
                    ],
                ],
                [
                    'label' => 'Resources',
                    'icon'  => 'fa-boxes-stacked',
                    'items' => [
                        ['label' => 'Staff Allocation', 'path' => 'operations/resources/staff-allocation', 'icon' => 'fa-users'],
                        ['label' => 'Equipment Allocation', 'path' => 'operations/resources/equipment-allocation', 'icon' => 'fa-screwdriver-wrench'],
                        ['label' => 'Material Usage', 'path' => 'operations/resources/material-usage', 'icon' => 'fa-cubes'],
                    ],
                ],
            ],
        ],
        'procurement' => [
            'label'    => 'Procurement',
            'prefixes' => ['procurement'],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'Dashboard', 'path' => 'procurement', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Suppliers',
                    'icon'  => 'fa-truck-field',
                    'items' => [
                        ['label' => 'Suppliers', 'path' => 'procurement/suppliers', 'icon' => 'fa-building'],
                        ['label' => 'Supplier Contacts', 'path' => 'procurement/supplier-contacts', 'icon' => 'fa-address-book'],
                    ],
                ],
                [
                    'label' => 'Purchasing',
                    'icon'  => 'fa-cart-shopping',
                    'items' => [
                        ['label' => 'Purchase Requests', 'path' => 'procurement/purchase-requests', 'icon' => 'fa-file-circle-plus'],
                        ['label' => 'RFQs', 'path' => 'procurement/rfqs', 'icon' => 'fa-file-invoice'],
                        ['label' => 'Supplier Quotations', 'path' => 'procurement/supplier-quotations', 'icon' => 'fa-file-invoice-dollar'],
                        ['label' => 'Purchase Orders', 'path' => 'procurement/purchase-orders', 'icon' => 'fa-boxes-stacked'],
                        ['label' => 'Goods Receipts (GRN)', 'path' => 'procurement/goods-receipts', 'icon' => 'fa-clipboard-check'],
                        ['label' => 'Purchase Returns', 'path' => 'procurement/purchase-returns', 'icon' => 'fa-rotate-left'],
                    ],
                ],
                [
                    'label' => 'Payables',
                    'icon'  => 'fa-file-invoice-dollar',
                    'items' => [
                        ['label' => 'Vendor Bills', 'path' => 'procurement/vendor-bills', 'icon' => 'fa-file-invoice'],
                        ['label' => 'Supplier Payments', 'path' => 'procurement/supplier-payments', 'icon' => 'fa-money-check-dollar'],
                    ],
                ],
                [
                    'label' => 'Contracts & Approvals',
                    'icon'  => 'fa-file-contract',
                    'items' => [
                        ['label' => 'Supplier Contracts', 'path' => 'procurement/supplier-contracts', 'icon' => 'fa-file-signature'],
                        ['label' => 'Approval Queue', 'path' => 'procurement/approval-queue', 'icon' => 'fa-clipboard-check'],
                    ],
                ],
            ],
        ],
        'sale' => [
            'label'    => 'Sales & CRM',
            'prefixes' => ['sale'],
            'groups'   => [
                [
                    'label' => 'Overview',
                    'icon'  => 'fa-gauge-high',
                    'items' => [
                        ['label' => 'Dashboard', 'path' => 'sale', 'icon' => 'fa-chart-line', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Leads',
                    'icon'  => 'fa-user-tag',
                    'items' => [
                        ['label' => 'New Leads', 'path' => 'sale/leads', 'icon' => 'fa-user-plus'],
                        ['label' => 'Lead Sources', 'path' => 'sale/lead-sources', 'icon' => 'fa-bullseye'],
                        ['label' => 'Lead Assignment', 'path' => 'sale/lead-assignment', 'icon' => 'fa-user-check'],
                        ['label' => 'Lead Scoring', 'path' => 'sale/lead-scoring', 'icon' => 'fa-star-half-stroke'],
                        ['label' => 'Lead Conversion', 'path' => 'sale/lead-conversion', 'icon' => 'fa-arrow-right-arrow-left'],
                    ],
                ],
                [
                    'label' => 'Customers',
                    'icon'  => 'fa-building-user',
                    'items' => [
                        ['label' => 'Companies (view)', 'path' => 'sale/companies', 'icon' => 'fa-building'],
                        ['label' => 'Contacts', 'path' => 'sale/contacts', 'icon' => 'fa-address-book'],
                        ['label' => 'Customer Groups', 'path' => 'sale/customer-groups', 'icon' => 'fa-users'],
                        ['label' => 'Customer History', 'path' => 'sale/customer-history', 'icon' => 'fa-clock-rotate-left'],
                        ['label' => 'Customer Documents', 'path' => 'sale/customer-documents', 'icon' => 'fa-folder-open'],
                    ],
                ],
                [
                    'label' => 'Opportunities',
                    'icon'  => 'fa-handshake',
                    'items' => [
                        ['label' => 'Pipeline', 'path' => 'sale/opportunities', 'icon' => 'fa-chart-kanban'],
                        ['label' => 'Sales Stages', 'path' => 'sale/sales-stages', 'icon' => 'fa-stairs'],
                        ['label' => 'Expected Revenue', 'path' => 'sale/expected-revenue', 'icon' => 'fa-coins'],
                        ['label' => 'Probability', 'path' => 'sale/probability', 'icon' => 'fa-percent'],
                        ['label' => 'Competitors', 'path' => 'sale/competitors', 'icon' => 'fa-chess'],
                    ],
                ],
                [
                    'label' => 'Activities',
                    'icon'  => 'fa-calendar-check',
                    'items' => [
                        ['label' => 'Calls', 'path' => 'sale/calls', 'icon' => 'fa-phone'],
                        ['label' => 'Emails', 'path' => 'sale/emails', 'icon' => 'fa-envelope'],
                        ['label' => 'Meetings', 'path' => 'sale/meetings', 'icon' => 'fa-users'],
                        ['label' => 'Tasks', 'path' => 'sale/tasks', 'icon' => 'fa-list-check'],
                        ['label' => 'Follow-ups', 'path' => 'sale/follow-ups', 'icon' => 'fa-bell'],
                    ],
                ],
                [
                    'label' => 'Quotations',
                    'icon'  => 'fa-file-invoice-dollar',
                    'items' => [
                        ['label' => 'Create Quotation', 'path' => 'sale/quotations', 'icon' => 'fa-file-circle-plus'],
                        ['label' => 'Approval Workflow', 'path' => 'sale/quotation-approval', 'icon' => 'fa-clipboard-check'],
                        ['label' => 'Price Lists', 'path' => 'sale/price-lists', 'icon' => 'fa-tags'],
                        ['label' => 'Quotation Templates', 'path' => 'sale/quotation-templates', 'icon' => 'fa-copy'],
                    ],
                ],
                [
                    'label' => 'Sales Orders',
                    'icon'  => 'fa-cart-shopping',
                    'items' => [
                        ['label' => 'Order Management', 'path' => 'sale/orders', 'icon' => 'fa-boxes-stacked'],
                        ['label' => 'Order Approval', 'path' => 'sale/order-approval', 'icon' => 'fa-stamp'],
                        ['label' => 'Order Tracking', 'path' => 'sale/order-tracking', 'icon' => 'fa-route'],
                    ],
                ],
                [
                    'label' => 'Deliveries',
                    'icon'  => 'fa-truck',
                    'items' => [
                        ['label' => 'Delivery Notes', 'path' => 'sale/delivery-notes', 'icon' => 'fa-file-lines'],
                        ['label' => 'Dispatch', 'path' => 'sale/dispatch', 'icon' => 'fa-truck-fast'],
                        ['label' => 'Tracking', 'path' => 'sale/delivery-tracking', 'icon' => 'fa-location-dot'],
                    ],
                ],
                [
                    'label' => 'Invoices',
                    'icon'  => 'fa-file-invoice',
                    'items' => [
                        ['label' => 'Customer Invoices', 'path' => 'sale/invoices', 'icon' => 'fa-file-invoice-dollar'],
                        ['label' => 'Payment Status', 'path' => 'sale/payment-status', 'icon' => 'fa-money-check-dollar'],
                        ['label' => 'Outstanding Payments', 'path' => 'sale/outstanding-payments', 'icon' => 'fa-hand-holding-dollar'],
                    ],
                ],
                [
                    'label' => 'Returns',
                    'icon'  => 'fa-rotate-left',
                    'items' => [
                        ['label' => 'Sales Returns', 'path' => 'sale/sales-returns', 'icon' => 'fa-box-open'],
                        ['label' => 'Refunds', 'path' => 'sale/refunds', 'icon' => 'fa-receipt'],
                    ],
                ],
                [
                    'label' => 'Sales Team',
                    'icon'  => 'fa-people-group',
                    'items' => [
                        ['label' => 'Sales Representatives', 'path' => 'sale/sales-representatives', 'icon' => 'fa-user-tie'],
                        ['label' => 'Targets', 'path' => 'sale/targets', 'icon' => 'fa-bullseye'],
                        ['label' => 'Commissions', 'path' => 'sale/commissions', 'icon' => 'fa-percent'],
                        ['label' => 'Territories', 'path' => 'sale/territories', 'icon' => 'fa-map-location-dot'],
                    ],
                ],
            ],
        ],
        'messages' => [
            'label'    => 'Messages',
            'prefixes' => ['messages'],
            'groups'   => [
                [
                    'label' => 'Inbox',
                    'icon'  => 'fa-comments',
                    'items' => [
                        ['label' => 'Messages', 'path' => 'messages', 'icon' => 'fa-envelope', 'exact' => true],
                    ],
                ],
                [
                    'label' => 'Administration',
                    'icon'  => 'fa-users-gear',
                    'items' => [
                        ['label' => 'Manage Groups', 'path' => 'messages/groups', 'icon' => 'fa-users'],
                    ],
                ],
            ],
        ],
        'administration' => [
            'label'    => 'Administration',
            'prefixes' => ['settings', 'users', 'roles', 'permissions'],
            'groups'   => [
                [
                    'label' => 'Settings',
                    'icon'  => 'fa-gear',
                    'items' => [
                        ['label' => 'General', 'path' => 'settings', 'icon' => 'fa-sliders', 'exact' => true],
                        ['label' => 'Company', 'path' => 'settings/company', 'icon' => 'fa-building'],
                        ['label' => 'Modules & Security', 'path' => 'settings/modules', 'icon' => 'fa-puzzle-piece'],
                    ],
                ],
                [
                    'label' => 'Accounting',
                    'icon'  => 'fa-calculator',
                    'items' => [
                        ['label' => 'Fiscal Years', 'path' => 'settings/fiscal-years', 'icon' => 'fa-calendar'],
                        ['label' => 'Cost Centers', 'path' => 'settings/cost-centers', 'icon' => 'fa-diagram-project'],
                    ],
                ],
                [
                    'label' => 'Access Control',
                    'icon'  => 'fa-shield-halved',
                    'items' => [
                        ['label' => 'Users', 'path' => 'users', 'icon' => 'fa-users'],
                        ['label' => 'Roles', 'path' => 'roles', 'icon' => 'fa-user-shield'],
                        ['label' => 'Permissions', 'path' => 'permissions', 'icon' => 'fa-key'],
                    ],
                ],
            ],
        ],
    ];
}
