<?php

/**
 * Primary navigation groups (global sidebar).
 *
 * @see docs/navigation/global-navigation-architecture.md
 */
return [
    [
        'key' => 'dashboard',
        'label_key' => 'nav.group.dashboard',
        'icon' => 'fe fe-home',
        'items' => [
            ['label_key' => 'nav.item.dashboard', 'route' => 'dashboard.index', 'gate' => 'dashboard.company'],
            ['label_key' => 'nav.item.ops_warehouse', 'route' => 'dashboard.ops.show', 'route_params' => ['persona' => 'warehouse'], 'permissions_any' => ['inventory.warehouses.view', 'inventory.catalog.view', 'inventory.stock.view']],
            ['label_key' => 'nav.item.ops_procurement', 'route' => 'dashboard.ops.show', 'route_params' => ['persona' => 'procurement'], 'permissions_any' => ['procurement.purchase_orders.view', 'procurement.goods_receipts.view']],
            ['label_key' => 'nav.item.ops_sales', 'route' => 'dashboard.ops.show', 'route_params' => ['persona' => 'sales'], 'permissions_any' => ['sales.orders.view']],
            ['label_key' => 'nav.item.ops_finance', 'route' => 'dashboard.ops.show', 'route_params' => ['persona' => 'finance'], 'permissions_any' => ['exports.access', 'operations.control.view']],
            ['label_key' => 'nav.item.ops_admin', 'route' => 'dashboard.ops.show', 'route_params' => ['persona' => 'admin'], 'permissions_any' => ['settings.users.view', 'settings.roles.view', 'admin.access']],
        ],
    ],
    [
        'key' => 'hr',
        'label_key' => 'nav.group.hr',
        'icon' => 'fe fe-briefcase',
        'items' => [
            ['label_key' => 'nav.item.self_dashboard', 'route' => 'me.dashboard', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_profile', 'route' => 'me.profile', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_documents', 'route' => 'me.documents.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_training', 'route' => 'me.training.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_assets', 'route' => 'me.assets.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_loans', 'route' => 'me.loans.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_performance', 'route' => 'me.performance.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_attendance', 'route' => 'me.attendance.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_team_attendance', 'route' => 'me.team.attendance.index', 'module' => 'hr', 'gate' => 'self_service.team_attendance', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_attendance_corrections', 'route' => 'me.attendance.corrections.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_leaves', 'route' => 'me.leaves.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_permission_requests', 'route' => 'me.permission-requests.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_overtime', 'route' => 'me.overtime.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.self_notifications', 'route' => 'me.notifications.index', 'module' => 'hr', 'gate' => 'self_service.portal', 'section' => 'self_service'],
            ['label_key' => 'nav.item.hr_dashboard', 'route' => 'hr.dashboard.index', 'module' => 'hr', 'permissions_any' => ['employees.view', 'attendance.view'], 'section' => 'organization'],
            ['label_key' => 'nav.item.departments', 'route' => 'hr.departments.index', 'module' => 'hr', 'permission' => 'departments.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.positions', 'route' => 'hr.positions.index', 'module' => 'hr', 'permission' => 'positions.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.employment_statuses', 'route' => 'hr.employment-statuses.index', 'module' => 'hr', 'permission' => 'employment_statuses.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.branches', 'route' => 'hr.branches.index', 'module' => 'hr', 'permission' => 'branches.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.sections', 'route' => 'hr.sections.index', 'module' => 'hr', 'permission' => 'sections.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.teams', 'route' => 'hr.teams.index', 'module' => 'hr', 'permission' => 'teams.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.job_grades', 'route' => 'hr.job-grades.index', 'module' => 'hr', 'permission' => 'job_grades.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.work_locations', 'route' => 'hr.work-locations.index', 'module' => 'hr', 'permission' => 'work_locations.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.cost_centers', 'route' => 'hr.cost-centers.index', 'module' => 'hr', 'permission' => 'cost_centers.view', 'section' => 'organization'],
            ['label_key' => 'nav.item.employees', 'route' => 'hr.employees.index', 'module' => 'hr', 'permission' => 'employees.view', 'section' => 'employees'],
            ['label_key' => 'nav.item.contracts', 'route' => 'hr.contracts.index', 'module' => 'hr', 'permission' => 'contracts.view', 'section' => 'employees'],
            ['label_key' => 'nav.item.contract_templates', 'route' => 'hr.contract-templates.index', 'module' => 'hr', 'permission' => 'contract_templates.manage', 'section' => 'employees'],
            ['label_key' => 'nav.item.assets', 'route' => 'hr.assets.index', 'module' => 'hr', 'permission' => 'assets.view', 'section' => 'assets'],
            ['label_key' => 'nav.item.loans', 'route' => 'hr.loans.index', 'module' => 'hr', 'permission' => 'loans.view', 'section' => 'employees'],
            ['label_key' => 'nav.item.allowances', 'route' => 'hr.allowances.index', 'module' => 'hr', 'permission' => 'compensation.view', 'section' => 'payroll'],
            ['label_key' => 'nav.item.deductions', 'route' => 'hr.deductions.index', 'module' => 'hr', 'permission' => 'compensation.view', 'section' => 'payroll'],
            ['label_key' => 'nav.item.performance', 'route' => 'hr.performance.cycles.index', 'module' => 'hr', 'permission' => 'performance.view', 'section' => 'talent'],
            ['label_key' => 'nav.item.performance_reviews', 'route' => 'hr.performance.reviews.index', 'module' => 'hr', 'permission' => 'performance.view', 'section' => 'talent'],
            ['label_key' => 'nav.item.training', 'route' => 'hr.training.courses.index', 'module' => 'hr', 'permission' => 'training.view', 'section' => 'talent'],
            ['label_key' => 'nav.item.training_sessions', 'route' => 'hr.training.sessions.index', 'module' => 'hr', 'permission' => 'training.view', 'section' => 'talent'],
            ['label_key' => 'nav.item.offboarding', 'route' => 'hr.offboarding.index', 'module' => 'hr', 'permission' => 'offboarding.view', 'section' => 'employees'],
            ['label_key' => 'nav.item.payroll_periods', 'route' => 'payroll.periods.index', 'module' => 'hr', 'permission' => 'payroll.view', 'section' => 'payroll'],
            ['label_key' => 'nav.item.attendance', 'route' => 'hr.attendance.index', 'module' => 'hr', 'permission' => 'attendance.view', 'section' => 'attendance'],
            ['label_key' => 'nav.item.attendance_monthly', 'route' => 'hr.attendance.monthly.index', 'module' => 'hr', 'permission' => 'attendance.view', 'section' => 'attendance'],
            ['label_key' => 'nav.item.attendance_corrections', 'route' => 'hr.attendance.corrections.index', 'module' => 'hr', 'permission' => 'attendance.corrections.review', 'section' => 'attendance'],
            ['label_key' => 'nav.item.attendance_exceptions', 'route' => 'hr.attendance.exceptions.index', 'module' => 'hr', 'permission' => 'attendance.view', 'section' => 'attendance'],
            ['label_key' => 'nav.item.attendance_devices', 'route' => 'hr.attendance.devices.index', 'module' => 'hr', 'permission' => 'attendance.manage', 'section' => 'attendance'],
            ['label_key' => 'nav.item.attendance_holidays', 'route' => 'hr.attendance.holidays.index', 'module' => 'hr', 'permission' => 'attendance.view', 'section' => 'attendance'],
            ['label_key' => 'nav.item.attendance_import', 'route' => 'hr.attendance.import.index', 'module' => 'hr', 'permission' => 'attendance.import', 'section' => 'attendance'],
            ['label_key' => 'nav.item.shifts', 'route' => 'hr.shifts.index', 'module' => 'hr', 'permission' => 'shifts.view', 'section' => 'attendance'],
            ['label_key' => 'nav.item.shift_calendar', 'route' => 'hr.shifts.calendar', 'module' => 'hr', 'permission' => 'shifts.view', 'section' => 'attendance'],
            ['label_key' => 'nav.item.shift_assignments', 'route' => 'hr.shifts.assignments.index', 'module' => 'hr', 'permission' => 'shifts.view', 'section' => 'attendance'],
            ['label_key' => 'nav.item.overtime', 'route' => 'hr.overtime.index', 'module' => 'hr', 'permission' => 'overtime.view', 'section' => 'attendance'],
            ['label_key' => 'nav.item.leave_requests', 'route' => 'hr.leave.requests.index', 'module' => 'hr', 'permission' => 'leave.view', 'section' => 'leave'],
            ['label_key' => 'nav.item.leave_balances', 'route' => 'hr.leave.balances.index', 'module' => 'hr', 'permission' => 'leave.view', 'section' => 'leave'],
            ['label_key' => 'nav.item.leave_types', 'route' => 'hr.leave.types.index', 'module' => 'hr', 'permission' => 'leave_types.view', 'section' => 'leave'],
            ['label_key' => 'nav.item.permission_requests', 'route' => 'hr.permission-requests.index', 'module' => 'hr', 'permission' => 'permission_requests.view', 'section' => 'leave'],
            ['label_key' => 'nav.item.recruitment_dashboard', 'route' => 'hr.recruitment.dashboard', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_candidates', 'route' => 'hr.recruitment.candidates.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_job_requests', 'route' => 'hr.recruitment.job-requests.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_vacancies', 'route' => 'hr.recruitment.vacancies.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_applications', 'route' => 'hr.recruitment.applications.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_career_portal', 'route' => 'hr.recruitment.career-portal', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_cv_database', 'route' => 'hr.recruitment.cvs.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_interviews', 'route' => 'hr.recruitment.interviews.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_interview_scorecards', 'route' => 'hr.recruitment.interview-scorecards.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_offer_letters', 'route' => 'hr.recruitment.offer-letters.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_hiring', 'route' => 'hr.recruitment.hiring.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_onboarding', 'route' => 'hr.recruitment.onboarding.index', 'module' => 'hr', 'permission' => 'recruitment.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.recruitment_reports', 'route' => 'hr.recruitment.reports.index', 'module' => 'hr', 'permission' => 'recruitment.reports.view', 'section' => 'recruitment'],
            ['label_key' => 'nav.item.hr_reports', 'route' => 'hr.reports.index', 'module' => 'hr', 'permission' => 'employees.view', 'section' => 'reports'],
            ['label_key' => 'nav.item.hr_analytics', 'route' => 'hr.analytics.index', 'module' => 'hr', 'permissions_all' => ['employees.view', 'attendance.view'], 'section' => 'reports'],
        ],
    ],
    [
        'key' => 'inventory',
        'label_key' => 'nav.group.inventory',
        'icon' => 'fe fe-layers',
        'items' => [
            ['label_key' => 'nav.item.inventory_warehouses', 'route' => 'inventory.warehouses.index', 'permission' => 'inventory.warehouses.view'],
            ['label_key' => 'nav.item.inventory_items', 'route' => 'inventory.items.index', 'permission' => 'inventory.catalog.view'],
            ['label_key' => 'nav.item.inventory_categories', 'route' => 'inventory.categories.index', 'permission' => 'inventory.catalog.view'],
            ['label_key' => 'nav.item.inventory_attributes', 'route' => 'inventory.attributes.index', 'permission' => 'inventory.catalog.view'],
            ['label_key' => 'nav.item.inventory_visibility', 'route' => 'inventory.visibility.index', 'permission' => 'inventory.stock.view'],
        ],
    ],
    [
        'key' => 'procurement',
        'label_key' => 'nav.group.procurement',
        'icon' => 'fe fe-package',
        'items' => [
            ['label_key' => 'nav.item.procurement_purchase_orders', 'route' => 'procurement.purchase-orders.index', 'permission' => 'procurement.purchase_orders.view'],
            ['label_key' => 'nav.item.procurement_goods_receipts', 'route' => 'procurement.goods-receipts.index', 'permission' => 'procurement.goods_receipts.view'],
        ],
    ],
    [
        'key' => 'sales',
        'label_key' => 'nav.group.sales',
        'icon' => 'fe fe-shopping-cart',
        'items' => [
            ['label_key' => 'nav.item.sales_orders', 'route' => 'sales.orders.index', 'permission' => 'sales.orders.view', 'nav_active_rule' => 'sales_orders_hub'],
            ['label_key' => 'nav.item.sales_orders_allocation', 'route' => 'sales.orders.index', 'route_params' => ['view' => 'allocation'], 'permission' => 'sales.orders.view', 'active_query' => ['view' => 'allocation']],
            ['label_key' => 'nav.item.sales_orders_fulfillment', 'route' => 'sales.orders.index', 'route_params' => ['view' => 'fulfillment'], 'permission' => 'sales.orders.view', 'active_query' => ['view' => 'fulfillment']],
        ],
    ],
    [
        'key' => 'accounting',
        'label_key' => 'nav.group.accounting',
        'icon' => 'fe fe-dollar-sign',
        'items' => [
            ['label_key' => 'nav.item.accounting_hub', 'route' => 'dashboard.accounting-hub', 'gate' => 'accounting.hub'],
            ['label_key' => 'nav.item.finance_workspace', 'route' => 'tenant.modules.finance', 'module' => 'finance', 'gate' => 'accounting.hub'],
        ],
    ],
    [
        'key' => 'reports',
        'label_key' => 'nav.group.reports',
        'icon' => 'fe fe-bar-chart-2',
        'items' => [
            ['label_key' => 'nav.item.exports', 'route' => 'exports.index', 'permission' => 'exports.access'],
        ],
    ],
    [
        'key' => 'operations',
        'label_key' => 'nav.group.operations',
        'icon' => 'fe fe-activity',
        'items' => [
            ['label_key' => 'nav.item.operations_control_center', 'route' => 'operations.control-center.index', 'permission' => 'operations.control.view'],
            ['label_key' => 'nav.item.workflow_inbox', 'route' => 'operations.workflow-inbox.index', 'permissions_any' => ['operations.control.view', 'leave.view', 'attendance.view', 'procurement.purchase_orders.view', 'procurement.goods_receipts.view', 'sales.orders.view']],
        ],
    ],
    [
        'key' => 'administration',
        'label_key' => 'nav.group.administration',
        'icon' => 'fe fe-settings',
        'items' => [
            ['label_key' => 'nav.item.languages', 'route' => 'settings.languages.index', 'permission' => 'languages.view'],
            ['label_key' => 'nav.item.translations', 'route' => 'settings.translations.index', 'permission' => 'translations.view'],
            ['label_key' => 'nav.item.custom_fields', 'route' => 'settings.custom-fields.index', 'permission' => 'custom_fields.view', 'gate' => 'custom_fields.plan'],
            ['label_key' => 'nav.item.geography', 'route' => 'settings.geography.countries.index', 'permissions_any' => ['geography.view', 'geography.manage']],
            ['label_key' => 'nav.item.users', 'route' => 'settings.users.index', 'permission' => 'settings.users.view'],
            ['label_key' => 'nav.item.roles', 'route' => 'settings.roles.index', 'permission' => 'settings.roles.view'],
            ['label_key' => 'nav.item.onboarding_wizard', 'route' => 'onboarding.wizard', 'gate' => 'onboarding.manage'],
        ],
    ],
    [
        'key' => 'admin',
        'label_key' => 'nav.group.admin',
        'icon' => 'fe fe-sliders',
        'gate' => 'admin.access',
        'items' => [
            ['label_key' => 'nav.item.admin_dashboard', 'route' => 'admin.dashboard'],
            ['label_key' => 'nav.item.admin_modules', 'route' => 'admin.modules.index'],
            ['label_key' => 'nav.item.admin_plans', 'route' => 'admin.plans.index'],
            ['label_key' => 'nav.item.admin_tenants', 'route' => 'admin.tenants.index'],
            ['label_key' => 'nav.item.activity_logs', 'route' => 'admin.activity-logs.index'],
            ['label_key' => 'nav.item.admin_operations_metrics', 'route' => 'admin.operations.business-metrics'],
        ],
    ],
];
