<?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'],
];
