<?php
declare(strict_types=1);

return [
    // Sport Browsing & Enrollment
    ['GET', '/api/v1/player/sports', 'PlayerApi\Controllers\Api\SportBrowseController@listSports', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/sports/{id:\d+}/groups', 'PlayerApi\Controllers\Api\SportBrowseController@listGroups', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/groups/{id:\d+}', 'PlayerApi\Controllers\Api\SportBrowseController@groupDetails', ['cors', 'player_auth'], null],

    // Enrollment
    ['POST', '/api/v1/player/groups/{id:\d+}/enroll', 'PlayerApi\Controllers\Api\EnrollmentController@enroll', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/enrollments', 'PlayerApi\Controllers\Api\EnrollmentController@myEnrollments', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/evaluations', 'PlayerApi\Controllers\Api\EnrollmentController@myEvaluations', ['cors', 'player_auth'], null],

    // Group Transfer
    ['POST', '/api/v1/player/transfers', 'PlayerApi\Controllers\Api\TransferController@requestTransfer', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/transfers', 'PlayerApi\Controllers\Api\TransferController@myTransfers', ['cors', 'player_auth'], null],

    // Facility Booking
    ['GET', '/api/v1/player/facilities', 'PlayerApi\Controllers\Api\BookingController@facilities', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/facilities/{id:\d+}/availability', 'PlayerApi\Controllers\Api\BookingController@availability', ['cors', 'player_auth'], null],
    ['POST', '/api/v1/player/bookings', 'PlayerApi\Controllers\Api\BookingController@book', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/bookings', 'PlayerApi\Controllers\Api\BookingController@myBookings', ['cors', 'player_auth'], null],
    ['POST', '/api/v1/player/bookings/{id:\d+}/cancel', 'PlayerApi\Controllers\Api\BookingController@cancel', ['cors', 'player_auth'], null],

    // Free-Time Entry
    ['GET', '/api/v1/player/free-time/facilities', 'PlayerApi\Controllers\Api\FreeTimeController@availableFacilities', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/free-time/{facilityId:\d+}/slots', 'PlayerApi\Controllers\Api\FreeTimeController@slots', ['cors', 'player_auth'], null],
    ['POST', '/api/v1/player/free-time/enter', 'PlayerApi\Controllers\Api\FreeTimeController@enter', ['cors', 'player_auth'], null],

    // Carnet (Invitations)
    ['GET', '/api/v1/player/carnet', 'PlayerApi\Controllers\Api\CarnetController@summary', ['cors', 'player_auth'], null],
    ['POST', '/api/v1/player/carnet/invite', 'PlayerApi\Controllers\Api\CarnetController@invite', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/carnet/history', 'PlayerApi\Controllers\Api\CarnetController@history', ['cors', 'player_auth'], null],

    // Notifications
    ['GET', '/api/v1/player/notifications', 'PlayerApi\Controllers\Api\NotificationController@list', ['cors', 'player_auth'], null],
    ['POST', '/api/v1/player/notifications/{id:\d+}/read', 'PlayerApi\Controllers\Api\NotificationController@markRead', ['cors', 'player_auth'], null],
    ['POST', '/api/v1/player/notifications/read-all', 'PlayerApi\Controllers\Api\NotificationController@markAllRead', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/notifications/unread-count', 'PlayerApi\Controllers\Api\NotificationController@unreadCount', ['cors', 'player_auth'], null],

    // Medical
    ['GET', '/api/v1/player/medical', 'PlayerApi\Controllers\Api\MedicalController@records', ['cors', 'player_auth'], null],
    ['POST', '/api/v1/player/medical', 'PlayerApi\Controllers\Api\MedicalController@submit', ['cors', 'player_auth'], null],
    ['POST', '/api/v1/player/medical/{id:\d+}/upload', 'PlayerApi\Controllers\Api\MedicalController@upload', ['cors', 'player_auth'], null],

    // Profile
    ['GET', '/api/v1/player/profile', 'PlayerApi\Controllers\Api\ProfileController@show', ['cors', 'player_auth'], null],
    ['PUT', '/api/v1/player/profile', 'PlayerApi\Controllers\Api\ProfileController@update', ['cors', 'player_auth'], null],
];
