<?php
declare(strict_types=1);

return [
    ['GET',  '/coaches',                        'Coaches\Controllers\CoachController@index',          ['auth'], 'coach.view'],
    ['GET',  '/coaches/create',                 'Coaches\Controllers\CoachController@create',         ['auth'], 'coach.manage'],
    ['POST', '/coaches',                        'Coaches\Controllers\CoachController@store',          ['auth', 'csrf'], 'coach.manage'],
    ['GET',  '/coaches/{id:\d+}',               'Coaches\Controllers\CoachController@show',           ['auth'], 'coach.view'],
    ['GET',  '/coaches/{id:\d+}/edit',          'Coaches\Controllers\CoachController@edit',           ['auth'], 'coach.manage'],
    ['POST', '/coaches/{id:\d+}',               'Coaches\Controllers\CoachController@update',         ['auth', 'csrf'], 'coach.manage'],
    ['POST', '/coaches/{id:\d+}/toggle',        'Coaches\Controllers\CoachController@toggle',         ['auth', 'csrf'], 'coach.manage'],
    ['POST', '/coaches/{id:\d+}/assign',        'Coaches\Controllers\CoachController@assign',         ['auth', 'csrf'], 'coach.manage'],
    ['POST', '/coaches/{id:\d+}/unassign',      'Coaches\Controllers\CoachController@unassign',       ['auth', 'csrf'], 'coach.manage'],
    ['POST', '/coaches/{id:\d+}/availability',  'Coaches\Controllers\CoachController@saveAvailability', ['auth', 'csrf'], 'coach.manage'],

    // Coach Ratings
    ['GET',  '/coach-ratings',                      'Coaches\Controllers\CoachRatingController@index',      ['auth'], 'coach.rate'],
    ['GET',  '/coach-ratings/create',               'Coaches\Controllers\CoachRatingController@create',     ['auth'], 'coach.rate'],
    ['POST', '/coach-ratings',                      'Coaches\Controllers\CoachRatingController@store',      ['auth', 'csrf'], 'coach.rate'],
    ['POST', '/coach-ratings/{id:\d+}/flag',        'Coaches\Controllers\CoachRatingController@flagRating', ['auth', 'csrf'], 'coach.manage_ratings'],
    ['POST', '/coach-ratings/{id:\d+}/respond',     'Coaches\Controllers\CoachRatingController@respond',    ['auth', 'csrf'], 'coach.manage_ratings'],

    // Coach Performance
    ['GET',  '/coach-performance',                  'Coaches\Controllers\CoachPerformanceController@dashboard', ['auth'], 'coach.view_performance'],
    ['GET',  '/coach-performance/ranking',          'Coaches\Controllers\CoachPerformanceController@ranking',   ['auth'], 'coach.view_performance'],
    ['GET',  '/coach-performance/{id:\d+}',         'Coaches\Controllers\CoachPerformanceController@detail',    ['auth'], 'coach.view_performance'],
    ['POST', '/coach-performance/calculate',        'Coaches\Controllers\CoachPerformanceController@calculate', ['auth', 'csrf'], 'coach.view_performance'],
];
