<?php
declare(strict_types=1);

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

// ────────────────────────────────────────────────────────────
// Sports Activities — Parent sidebar menu with all 7 module children
// This file owns the entire sports_activities menu group.
// ────────────────────────────────────────────────────────────

MenuRegistry::register('sports_activities', [
    'label_ar'   => 'الأنشطة الرياضية',
    'label_en'   => 'Sports Activities',
    'icon'       => 'activity',
    'route'      => '/sports-dashboard',
    'permission' => 'discipline.view',
    'parent'     => null,
    'order'      => 395,
    'children'   => [
        ['label_ar' => 'لوحة التحكم',          'label_en' => 'Dashboard',               'route' => '/sports-dashboard',               'permission' => 'discipline.view',              'order' => 1],
        ['label_ar' => 'المراية (عرض مباشر)',  'label_en' => 'Mirror Display',          'route' => '/mirror',                         'permission' => 'facility.mirror',              'order' => 2],
        ['label_ar' => 'الأنشطة والأكاديميات', 'label_en' => 'Disciplines & Academies', 'route' => '/disciplines',                    'permission' => 'discipline.view',              'order' => 3],
        ['label_ar' => 'المدربين',             'label_en' => 'Coaches',                 'route' => '/coaches',                        'permission' => 'coach.view',                   'order' => 4],
        ['label_ar' => 'المجموعات واللاعبين',  'label_en' => 'Groups & Players',        'route' => '/training-groups',                'permission' => 'training_group.view',          'order' => 5],
        ['label_ar' => 'الحصص والحضور',        'label_en' => 'Sessions & Attendance',   'route' => '/sessions',                       'permission' => 'session.view',                 'order' => 6],
        ['label_ar' => 'المرافق والشبكات',     'label_en' => 'Facilities & Grids',      'route' => '/facility-grids',                 'permission' => 'facility_grid.view',           'order' => 7],
        ['label_ar' => 'الحجوزات',             'label_en' => 'Reservations',            'route' => '/reservations',                   'permission' => 'reservation.view',             'order' => 8],
        ['label_ar' => 'التأجير المؤسسي',      'label_en' => 'Corporate Rentals',       'route' => '/rentals',                        'permission' => 'rental.view',                  'order' => 9],
        ['label_ar' => 'حمام السباحة',         'label_en' => 'Pool Management',         'route' => '/pool',                           'permission' => 'pool.view',                    'order' => 10],
        ['label_ar' => 'الاشتراكات والتسعير',  'label_en' => 'Subscriptions & Pricing', 'route' => '/activity-subscriptions',         'permission' => 'activity_sub.view',            'order' => 11],
        ['label_ar' => 'العقود والتسويات',     'label_en' => 'Contracts & Settlements', 'route' => '/academy-contracts',              'permission' => 'academy_contract.view',        'order' => 12],
    ],
]);

PermissionRegistry::register('disciplines', [
    'discipline.view'   => ['ar' => 'عرض الأنشطة الرياضية',  'en' => 'View Disciplines'],
    'discipline.manage' => ['ar' => 'إدارة الأنشطة الرياضية', 'en' => 'Manage Disciplines'],
]);
