<?php
declare(strict_types=1);

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

MenuRegistry::register('branches_settings', [
    'label_ar'   => 'الفروع والإعدادات',
    'label_en'   => 'Branches & Settings',
    'icon'       => '🏢',
    'route'      => '/branches',
    'permission' => 'settings.view',
    'order'      => 200,
    'children'   => [
        ['label_ar' => 'الفروع',       'label_en' => 'Branches',  'route' => '/branches',  'permission' => 'settings.view', 'order' => 1],
        ['label_ar' => 'إعدادات النظام', 'label_en' => 'Settings',  'route' => '/settings',  'permission' => 'settings.view', 'order' => 2],
        ['label_ar' => 'العلامة التجارية', 'label_en' => 'Branding', 'route' => '/settings/branding', 'permission' => 'settings.edit', 'order' => 3],
        ['label_ar' => 'سجل المراجعة',  'label_en' => 'Audit Log', 'route' => '/audit',     'permission' => 'report.view_audit', 'order' => 4],
        ['label_ar' => 'التنبيهات',     'label_en' => 'Alerts',    'route' => '/alerts',    'permission' => 'alert.view',        'order' => 5],
    ],
]);

PermissionRegistry::register('settings', [
    'settings.view'   => ['ar' => 'عرض الإعدادات',  'en' => 'View Settings'],
    'settings.edit'   => ['ar' => 'تعديل الإعدادات', 'en' => 'Edit Settings'],
    'settings.backup' => ['ar' => 'النسخ الاحتياطي', 'en' => 'Backup'],
]);

PermissionRegistry::register('audit', [
    'report.view_audit' => ['ar' => 'عرض سجل المراجعة', 'en' => 'View Audit Log'],
]);