<?php

/**
 * Grouped permission catalog for the roles matrix UI.
 * Only slugs listed in config('tenant-permissions.abilities') are valid.
 *
 * @see config/tenant-permissions.php
 */
return [
    'groups' => [
        'hr.people' => [
            'label_key' => 'permissions.groups.hr_people',
            'abilities' => [
                'departments.view', 'departments.create', 'departments.update', 'departments.delete',
                'positions.view', 'positions.create', 'positions.update', 'positions.deactivate',
                'employment_statuses.view', 'employment_statuses.create',
                'employment_statuses.update', 'employment_statuses.deactivate',
                'branches.view', 'branches.create', 'branches.update', 'branches.deactivate',
                'sections.view', 'sections.create', 'sections.update', 'sections.deactivate',
                'teams.view', 'teams.create', 'teams.update', 'teams.deactivate',
                'job_grades.view', 'job_grades.create', 'job_grades.update', 'job_grades.deactivate',
                'work_locations.view', 'work_locations.create', 'work_locations.update', 'work_locations.deactivate',
                'cost_centers.view', 'cost_centers.create', 'cost_centers.update', 'cost_centers.deactivate',
                'employees.view', 'employees.create', 'employees.update', 'employees.deactivate',
                'employees.salary.view', 'employees.documents.view',
                'contracts.view', 'contracts.create', 'contracts.update', 'contracts.deactivate',
                'contract_templates.manage',
                'assets.view', 'assets.create', 'assets.update', 'assets.manage',
                'loans.view', 'loans.create', 'loans.update', 'loans.approve', 'loans.manage',
                'allowances.view', 'allowances.create', 'allowances.update', 'allowances.manage',
                'deductions.view', 'deductions.create', 'deductions.update', 'deductions.manage',
                'compensation.view', 'compensation.create', 'compensation.update', 'compensation.manage',
                'performance.view', 'performance.create', 'performance.update', 'performance.manage',
                'training.view', 'training.create', 'training.update', 'training.manage',
                'offboarding.view', 'offboarding.create', 'offboarding.update', 'offboarding.manage',
            ],
        ],
        'hr.attendance' => [
            'label_key' => 'permissions.groups.hr_attendance',
            'abilities' => [
                'attendance.view',
                'attendance.create',
                'attendance.checkout.register',
                'attendance.checkout.update',
                'attendance.import',
                'attendance.manage',
                'attendance.corrections.review',
                'permission_requests.view', 'permission_requests.create', 'permission_requests.review',
                'overtime.view', 'overtime.create', 'overtime.review',
            ],
        ],
        'hr.leave_shifts' => [
            'label_key' => 'permissions.groups.hr_leave_shifts',
            'abilities' => [
                'leave.view', 'leave.create', 'leave.approve.manager', 'leave.approve.hr', 'leave.reject',
                'leave_types.view', 'leave_types.create', 'leave_types.update', 'leave_types.deactivate',
                'shifts.view', 'shifts.create', 'shifts.update', 'shifts.deactivate', 'shifts.assign',
            ],
        ],
        'hr.recruitment' => [
            'label_key' => 'permissions.groups.hr_recruitment',
            'abilities' => [
                'recruitment.view',
                'recruitment.create',
                'recruitment.manage',
                'recruitment.hire',
                'recruitment.reports.view',
            ],
        ],
        'payroll' => [
            'label_key' => 'permissions.groups.payroll',
            'abilities' => [
                'payroll.view', 'payroll.payslips.view', 'payroll.process',
                'payroll.finalize', 'payroll.adjustments.manage',
            ],
        ],
        'inventory' => [
            'label_key' => 'permissions.groups.inventory',
            'abilities' => [
                'inventory.warehouses.view', 'inventory.warehouses.manage',
                'inventory.catalog.view', 'inventory.catalog.manage', 'inventory.stock.view',
            ],
        ],
        'procurement' => [
            'label_key' => 'permissions.groups.procurement',
            'abilities' => [
                'procurement.purchase_orders.view', 'procurement.purchase_orders.manage',
                'procurement.goods_receipts.view', 'procurement.goods_receipts.manage',
            ],
        ],
        'sales' => [
            'label_key' => 'permissions.groups.sales',
            'abilities' => ['sales.orders.view', 'sales.orders.operate'],
        ],
        'localization' => [
            'label_key' => 'permissions.groups.localization',
            'abilities' => [
                'languages.view', 'languages.create', 'languages.update', 'languages.delete',
                'translations.view', 'translations.create', 'translations.update', 'translations.delete',
                'geography.view', 'geography.manage',
            ],
        ],
        'customization_reports' => [
            'label_key' => 'permissions.groups.customization_reports',
            'abilities' => [
                'custom_fields.view', 'custom_fields.create',
                'custom_fields.update', 'custom_fields.deactivate', 'exports.access',
            ],
        ],
        'administration' => [
            'label_key' => 'permissions.groups.administration',
            'abilities' => [
                'settings.users.view', 'settings.users.invite', 'settings.users.assign_roles',
                'settings.roles.view', 'settings.roles.manage',
            ],
        ],
        'operations' => [
            'label_key' => 'permissions.groups.operations',
            'abilities' => ['operations.control.view', 'operations.control.manage'],
        ],
    ],
];
