<?php
declare(strict_types=1);

return [
    ['GET',  '/players',                             'PlayerAffairs\Controllers\PlayerController@index',          ['auth'], 'player.view'],
    ['GET',  '/players/create',                      'PlayerAffairs\Controllers\PlayerController@create',         ['auth'], 'player.register'],
    ['POST', '/players',                             'PlayerAffairs\Controllers\PlayerController@store',          ['auth', 'csrf'], 'player.register'],
    ['GET',  '/players/{id:\d+}',                    'PlayerAffairs\Controllers\PlayerController@show',           ['auth'], 'player.view'],
    ['GET',  '/players/{id:\d+}/edit',               'PlayerAffairs\Controllers\PlayerController@edit',           ['auth'], 'player.edit'],
    ['POST', '/players/{id:\d+}',                    'PlayerAffairs\Controllers\PlayerController@update',         ['auth', 'csrf'], 'player.edit'],
    ['POST', '/players/{id:\d+}/card/activate',      'PlayerAffairs\Controllers\PlayerController@activateCard',   ['auth', 'csrf'], 'player.manage_card'],
    ['POST', '/players/{id:\d+}/card/suspend',       'PlayerAffairs\Controllers\PlayerController@suspendCard',    ['auth', 'csrf'], 'player.manage_card'],
    ['POST', '/players/{id:\d+}/card/revoke',        'PlayerAffairs\Controllers\PlayerController@revokeCard',     ['auth', 'csrf'], 'player.manage_card'],
    ['POST', '/players/{id:\d+}/medical',            'PlayerAffairs\Controllers\PlayerController@addMedical',     ['auth', 'csrf'], 'player.manage_medical'],
    ['POST', '/players/{id:\d+}/enroll',             'PlayerAffairs\Controllers\PlayerController@enroll',         ['auth', 'csrf'], 'academy.enroll'],
    ['POST', '/players/{id:\d+}/enroll/drop',        'PlayerAffairs\Controllers\PlayerController@dropEnrollment', ['auth', 'csrf'], 'academy.enroll'],

    // API
    ['POST', '/api/players/parse-nid',                  'PlayerAffairs\Controllers\PlayerController@parseNid',       ['auth'], 'player.register'],
    ['GET',  '/api/players/academies',                  'PlayerAffairs\Controllers\PlayerController@apiAcademies',   ['auth'], 'player.view'],

    // Medical Approvals (مجلس الأمناء)
    ['GET',  '/medical-approvals',                      'PlayerAffairs\Controllers\MedicalApprovalController@index',   ['auth'], 'player.approve_medical'],
    ['POST', '/medical-approvals/{id:\d+}/approve',     'PlayerAffairs\Controllers\MedicalApprovalController@approve', ['auth', 'csrf'], 'player.approve_medical'],
    ['POST', '/medical-approvals/{id:\d+}/reject',      'PlayerAffairs\Controllers\MedicalApprovalController@reject',  ['auth', 'csrf'], 'player.approve_medical'],

    // Attendance
    ['GET',  '/attendance',                             'PlayerAffairs\Controllers\AttendanceController@index',      ['auth'], 'player.view'],
    ['POST', '/attendance/record',                      'PlayerAffairs\Controllers\AttendanceController@record',     ['auth', 'csrf'], 'player.edit'],

    // Player Evaluations
    ['GET',  '/evaluations',                            'PlayerAffairs\Controllers\EvaluationController@index',      ['auth'], 'player.evaluate'],
    ['GET',  '/evaluations/create',                     'PlayerAffairs\Controllers\EvaluationController@create',     ['auth'], 'player.evaluate'],
    ['POST', '/evaluations',                            'PlayerAffairs\Controllers\EvaluationController@store',      ['auth', 'csrf'], 'player.evaluate'],
    ['GET',  '/evaluations/{id:\d+}',                   'PlayerAffairs\Controllers\EvaluationController@show',       ['auth'], 'player.evaluate'],
    ['POST', '/evaluations/{id:\d+}/approve',           'PlayerAffairs\Controllers\EvaluationController@approve',    ['auth', 'csrf'], 'player.evaluate'],
    ['GET',  '/api/evaluations/criteria/{disciplineId:\d+}', 'PlayerAffairs\Controllers\EvaluationController@apiCriteria', ['auth'], 'player.evaluate'],

    // Player Injuries
    ['GET',  '/injuries',                       'PlayerAffairs\Controllers\InjuryController@index',        ['auth'], 'player.manage_injuries'],
    ['GET',  '/injuries/create',                'PlayerAffairs\Controllers\InjuryController@create',       ['auth'], 'player.manage_injuries'],
    ['POST', '/injuries',                       'PlayerAffairs\Controllers\InjuryController@store',        ['auth', 'csrf'], 'player.manage_injuries'],
    ['GET',  '/injuries/{id:\d+}',              'PlayerAffairs\Controllers\InjuryController@show',         ['auth'], 'player.manage_injuries'],
    ['POST', '/injuries/{id:\d+}/status',       'PlayerAffairs\Controllers\InjuryController@updateStatus', ['auth', 'csrf'], 'player.manage_injuries'],
    ['POST', '/injuries/{id:\d+}/clear',        'PlayerAffairs\Controllers\InjuryController@clearPlayer',  ['auth', 'csrf'], 'player.manage_injuries'],

    // Fitness Tests
    ['GET',  '/fitness-tests',                  'PlayerAffairs\Controllers\FitnessController@index',       ['auth'], 'player.manage_fitness'],
    ['GET',  '/fitness-tests/create',           'PlayerAffairs\Controllers\FitnessController@create',      ['auth'], 'player.manage_fitness'],
    ['POST', '/fitness-tests',                  'PlayerAffairs\Controllers\FitnessController@store',       ['auth', 'csrf'], 'player.manage_fitness'],
    ['GET',  '/fitness-tests/{id:\d+}',         'PlayerAffairs\Controllers\FitnessController@show',        ['auth'], 'player.manage_fitness'],
];
