<?php
declare(strict_types=1);

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

MenuRegistry::register('tutorials', [
    'label_ar'   => 'الشروحات',
    'label_en'   => 'Tutorials',
    'icon'       => 'graduation-cap',
    'route'      => '/tutorials',
    'permission' => 'tutorials.view',
    'parent'     => null,
    'order'      => 990,
    'children'   => [
        // ── العمليات (Operations) ──────────────────────────
        ['label_ar' => 'شئون العضوية',           'label_en' => 'Membership',           'route' => '/tutorials/membership',        'permission' => 'tutorials.view', 'order' => 1],
        ['label_ar' => 'الاشتراكات السنوية',     'label_en' => 'Subscriptions',        'route' => '/tutorials/subscriptions',     'permission' => 'tutorials.view', 'order' => 2],
        ['label_ar' => 'التقسيط',                'label_en' => 'Installments',         'route' => '/tutorials/installments',      'permission' => 'tutorials.view', 'order' => 3],
        ['label_ar' => 'المخالفات والغرامات',    'label_en' => 'Fines',                'route' => '/tutorials/fines',             'permission' => 'tutorials.view', 'order' => 4],
        ['label_ar' => 'المقابلات',              'label_en' => 'Interviews',           'route' => '/tutorials/interviews',        'permission' => 'tutorials.view', 'order' => 5],
        ['label_ar' => 'المستندات',              'label_en' => 'Documents',            'route' => '/tutorials/documents',         'permission' => 'tutorials.view', 'order' => 6],
        ['label_ar' => 'العضوية الموسمية',       'label_en' => 'Seasonal',             'route' => '/tutorials/seasonal',          'permission' => 'tutorials.view', 'order' => 7],
        // ── الأنشطة الرياضية (Sports) ──────────────────────
        ['label_ar' => 'تسجيل النشاط الرياضي',   'label_en' => 'SA Registration',      'route' => '/tutorials/sa-registration',   'permission' => 'tutorials.view', 'order' => 10],
        ['label_ar' => 'شؤون اللاعبين',          'label_en' => 'Player Affairs',       'route' => '/tutorials/player-affairs',    'permission' => 'tutorials.view', 'order' => 11],
        ['label_ar' => 'المدربين',               'label_en' => 'Coaches',              'route' => '/tutorials/coaches',           'permission' => 'tutorials.view', 'order' => 12],
        ['label_ar' => 'المرافق والملاعب',       'label_en' => 'Facilities',           'route' => '/tutorials/facilities',        'permission' => 'tutorials.view', 'order' => 13],
        ['label_ar' => 'الحجوزات',               'label_en' => 'Reservations',         'route' => '/tutorials/reservations',      'permission' => 'tutorials.view', 'order' => 14],
        ['label_ar' => 'البطولات',               'label_en' => 'Tournaments',          'route' => '/tutorials/tournaments',       'permission' => 'tutorials.view', 'order' => 15],
        ['label_ar' => 'حمامات السباحة',         'label_en' => 'Pool Management',      'route' => '/tutorials/pool-management',   'permission' => 'tutorials.view', 'order' => 16],
        ['label_ar' => 'الكارنيهات',             'label_en' => 'Carnets',              'route' => '/tutorials/carnets',           'permission' => 'tutorials.view', 'order' => 17],
        // ── المالية (Finance) ──────────────────────────────
        ['label_ar' => 'الخزينة الرئيسية',       'label_en' => 'Cashier',              'route' => '/tutorials/cashier',           'permission' => 'tutorials.view', 'order' => 20],
        ['label_ar' => 'الخزنة الفرعية',         'label_en' => 'Treasury',             'route' => '/tutorials/treasury',          'permission' => 'tutorials.view', 'order' => 21],
        ['label_ar' => 'المدفوعات',              'label_en' => 'Payments',             'route' => '/tutorials/payments',          'permission' => 'tutorials.view', 'order' => 22],
        ['label_ar' => 'المحاسبة والماليات',     'label_en' => 'Accounting',           'route' => '/tutorials/accounting',        'permission' => 'tutorials.view', 'order' => 23],
        // ── سلسلة التوريد (Supply Chain) ───────────────────
        ['label_ar' => 'المخازن',                'label_en' => 'Inventory',            'route' => '/tutorials/inventory',         'permission' => 'tutorials.view', 'order' => 30],
        ['label_ar' => 'المشتريات',              'label_en' => 'Procurement',          'route' => '/tutorials/procurement',       'permission' => 'tutorials.view', 'order' => 31],
        ['label_ar' => 'المبيعات',               'label_en' => 'Sales',                'route' => '/tutorials/sales',             'permission' => 'tutorials.view', 'order' => 32],
        // ── الشئون الإدارية (Administration) ───────────────
        ['label_ar' => 'الموارد البشرية',        'label_en' => 'HR',                   'route' => '/tutorials/hr',                'permission' => 'tutorials.view', 'order' => 40],
        ['label_ar' => 'الإيجارات',              'label_en' => 'Rentals',              'route' => '/tutorials/rentals',           'permission' => 'tutorials.view', 'order' => 41],
        // ── النظام والإعدادات (System) ─────────────────────
        ['label_ar' => 'التقارير',               'label_en' => 'Reports',              'route' => '/tutorials/reports',           'permission' => 'tutorials.view', 'order' => 50],
        ['label_ar' => 'المستخدمون والأدوار',    'label_en' => 'Users & Roles',        'route' => '/tutorials/roles',             'permission' => 'tutorials.view', 'order' => 51],
        ['label_ar' => 'النماذج الإلكترونية',    'label_en' => 'Forms',                'route' => '/tutorials/forms',             'permission' => 'tutorials.view', 'order' => 52],
        ['label_ar' => 'سير العمل',              'label_en' => 'Workflow',             'route' => '/tutorials/workflow',          'permission' => 'tutorials.view', 'order' => 53],
        ['label_ar' => 'الإعدادات والفروع',      'label_en' => 'Settings & Branches',  'route' => '/tutorials/settings',          'permission' => 'tutorials.view', 'order' => 54],
        ['label_ar' => 'الإشعارات',              'label_en' => 'Notifications',        'route' => '/tutorials/notifications',     'permission' => 'tutorials.view', 'order' => 55],
        ['label_ar' => 'التسعير والخصومات',      'label_en' => 'Pricing',              'route' => '/tutorials/pricing-management','permission' => 'tutorials.view', 'order' => 56],
        ['label_ar' => 'سجل المراجعة',           'label_en' => 'Audit Log',            'route' => '/tutorials/audit',             'permission' => 'tutorials.view', 'order' => 57],
        ['label_ar' => 'الدعم الفني',            'label_en' => 'Support',              'route' => '/tutorials/support',           'permission' => 'tutorials.view', 'order' => 58],
    ],
]);

PermissionRegistry::register('tutorials', [
    'tutorials.view' => ['ar' => 'عرض الشروحات', 'en' => 'View Tutorials'],
]);
