<?php
declare(strict_types=1);

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

PermissionRegistry::register('player_affairs', [
    'player.view'              => ['ar' => 'عرض اللاعبين',           'en' => 'View Players'],
    'player.search'            => ['ar' => 'بحث عن لاعبين',         'en' => 'Search Players'],
    'player.register'          => ['ar' => 'تسجيل لاعب',            'en' => 'Register Player'],
    'player.edit'              => ['ar' => 'تعديل بيانات لاعب',     'en' => 'Edit Player'],
    'player.manage_card'       => ['ar' => 'إدارة كارنيه اللاعب',    'en' => 'Manage Player Card'],
    'player.view_medical'      => ['ar' => 'عرض السجل الطبي',       'en' => 'View Medical Records'],
    'player.manage_medical'    => ['ar' => 'إدارة السجل الطبي',     'en' => 'Manage Medical Records'],
    'player.approve_medical'   => ['ar' => 'اعتماد السجل الطبي',    'en' => 'Approve Medical Records'],
    'player.record_attendance' => ['ar' => 'تسجيل الحضور',          'en' => 'Record Attendance'],
    'player.evaluate'          => ['ar' => 'تقييم اللاعبين',         'en' => 'Evaluate Players'],
    'player.manage_injuries'   => ['ar' => 'إدارة إصابات اللاعبين', 'en' => 'Manage Player Injuries'],
    'player.manage_fitness'    => ['ar' => 'إدارة اختبارات اللياقة', 'en' => 'Manage Fitness Tests'],
]);

MenuRegistry::register('player_injuries', [
    'label_ar'   => 'إصابات اللاعبين',
    'icon'       => 'heart-pulse',
    'route'      => '/injuries',
    'permission' => 'player.manage_injuries',
    'order'      => 393,
    'parent'     => 'sports_activities',
]);

MenuRegistry::register('fitness_tests', [
    'label_ar'   => 'اختبارات اللياقة',
    'icon'       => 'activity',
    'route'      => '/fitness-tests',
    'permission' => 'player.manage_fitness',
    'order'      => 394,
    'parent'     => 'sports_activities',
]);

// ── Cross-module event listeners for the sports system ──
require_once __DIR__ . '/EventListeners.php';
