<?php
declare(strict_types=1);

use App\Core\Registries\MenuRegistry;
use App\Core\Registries\PermissionRegistry;

MenuRegistry::register('users_roles', [
    'label_ar'   => 'المستخدمون والصلاحيات',
    'label_en'   => 'Users & Roles',
    'icon'       => '👥',
    'route'      => '/users',
    'permission' => 'user.view',
    'order'      => 100,
    'children'   => [
        ['label_ar' => 'الموظفون', 'label_en' => 'Employees', 'route' => '/users', 'permission' => 'user.view', 'order' => 1],
        ['label_ar' => 'إضافة موظف', 'label_en' => 'Add Employee', 'route' => '/users/create', 'permission' => 'user.create', 'order' => 2],
        ['label_ar' => 'الأدوار', 'label_en' => 'Roles', 'route' => '/roles', 'permission' => 'user.assign_role', 'order' => 3],
    ],
]);

PermissionRegistry::register('users', [
    'user.view'        => ['ar' => 'عرض الموظفين',    'en' => 'View Employees'],
    'user.create'      => ['ar' => 'إنشاء موظف',      'en' => 'Create Employee'],
    'user.edit'        => ['ar' => 'تعديل موظف',      'en' => 'Edit Employee'],
    'user.deactivate'  => ['ar' => 'تعطيل موظف',      'en' => 'Deactivate Employee'],
    'user.assign_role' => ['ar' => 'تعيين الأدوار',    'en' => 'Assign Roles'],
]);