<?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'      => '/disciplines',
    'permission' => 'discipline.view',
    'parent'     => null,
    'order'      => 395,
    'children'   => [
        ['label_ar' => 'لوحة التحكم',       'label_en' => 'Sports Dashboard',      'route' => '/sports-dashboard',               'permission' => 'discipline.view',              'order' => 0],
        ['label_ar' => 'الأنشطة الرياضية',  'label_en' => 'Disciplines',           'route' => '/disciplines',                    'permission' => 'discipline.view',              'order' => 1],
        ['label_ar' => 'الملاعب والمرافق',   'label_en' => 'Facilities',            'route' => '/facilities',                     'permission' => 'facility.view',                'order' => 2],
        ['label_ar' => 'الأكاديميات',        'label_en' => 'Academies',             'route' => '/academies',                      'permission' => 'academy.view',                 'order' => 3],
        ['label_ar' => 'شئون اللاعبين',      'label_en' => 'Players',               'route' => '/players',                        'permission' => 'player.view',                  'order' => 4],
        ['label_ar' => 'الحضور والغياب',     'label_en' => 'Attendance',            'route' => '/attendance',                     'permission' => 'player.view',                  'order' => 4.5],
        ['label_ar' => 'الحجوزات',           'label_en' => 'Reservations',          'route' => '/reservations',                   'permission' => 'reservation.view',             'order' => 5],
        ['label_ar' => 'التأجير المؤسسي',    'label_en' => 'Corporate Rentals',     'route' => '/rentals',                        'permission' => 'rental.view',                  'order' => 6],
        ['label_ar' => 'اشتراكات الأنشطة',   'label_en' => 'Activity Subscriptions','route' => '/activity-subscriptions',         'permission' => 'activity_sub.view',            'order' => 7],
        ['label_ar' => 'تسعير الأنشطة',      'label_en' => 'Activity Pricing',      'route' => '/activity-subscriptions/pricing', 'permission' => 'activity_sub.manage_pricing',  'order' => 8],
    ],
]);

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