<?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],
    ['POST', '/api/v1/player/profile/photo', 'PlayerApi\Controllers\Api\PhotoController@upload', ['cors', 'player_auth'], null],

    // Financials
    ['GET', '/api/v1/player/financials/summary', 'PlayerApi\Controllers\Api\FinancialController@summary', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/financials/subscriptions', 'PlayerApi\Controllers\Api\FinancialController@subscriptions', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/financials/payments', 'PlayerApi\Controllers\Api\FinancialController@payments', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/financials/fines', 'PlayerApi\Controllers\Api\FinancialController@fines', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/financials/installments', 'PlayerApi\Controllers\Api\FinancialController@installments', ['cors', 'player_auth'], null],

    // Attendance
    ['GET', '/api/v1/player/attendance', 'PlayerApi\Controllers\Api\AttendanceController@history', ['cors', 'player_auth'], null],
    ['GET', '/api/v1/player/attendance/summary', 'PlayerApi\Controllers\Api\AttendanceController@summary', ['cors', 'player_auth'], null],

    // Achievements
    ['GET', '/api/v1/player/achievements', 'PlayerApi\Controllers\Api\AchievementController@index', ['cors', 'player_auth'], null],

    // Device / Push Token
    ['POST', '/api/v1/player/device', 'PlayerApi\Controllers\Api\DeviceController@register', ['cors', 'player_auth'], null],
    ['DELETE', '/api/v1/player/device', 'PlayerApi\Controllers\Api\DeviceController@unregister', ['cors', 'player_auth'], null],
];
