<?php
declare(strict_types=1);

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

MenuRegistry::register('members', [
    'label_ar'   => 'إدارة الأعضاء',
    'label_en'   => 'Member Management',
    'icon'       => '👥',
    'route'      => '/members',
    'permission' => 'member.view',
    'parent'     => null,
    'order'      => 300,
    'children'   => [
        ['label_ar' => 'كل الأعضاء',   'label_en' => 'All Members',    'route' => '/members',        'permission' => 'member.view',   'order' => 1],
        ['label_ar' => 'عضو جديد',     'label_en' => 'New Member',     'route' => '/members/create',  'permission' => 'member.create', 'order' => 2],
        ['label_ar' => 'بحث الأعضاء',  'label_en' => 'Search Members', 'route' => '/members/search',  'permission' => 'member.search', 'order' => 3],
    ],
]);

PermissionRegistry::register('members', [
    'member.view'            => ['ar' => 'عرض الأعضاء',        'en' => 'View Members'],
    'member.create'          => ['ar' => 'إنشاء عضو',          'en' => 'Create Member'],
    'member.edit'            => ['ar' => 'تعديل عضو',          'en' => 'Edit Member'],
    'member.archive'         => ['ar' => 'أرشفة عضو',          'en' => 'Archive Member'],
    'member.search'          => ['ar' => 'بحث الأعضاء',        'en' => 'Search Members'],
    'member.view_financial'  => ['ar' => 'عرض البيانات المالية', 'en' => 'View Financial Data'],
    'member.change_status'   => ['ar' => 'تغيير حالة العضوية',  'en' => 'Change Member Status'],
]);