<?php
declare(strict_types=1);

return [
    // Playground CRUD
    ['GET',  '/playgrounds',                    'PlaygroundAdmin\Controllers\PlaygroundController@index',   ['auth'], 'playground.view'],
    ['GET',  '/playgrounds/create',             'PlaygroundAdmin\Controllers\PlaygroundController@create',  ['auth'], 'playground.manage'],
    ['POST', '/playgrounds',                    'PlaygroundAdmin\Controllers\PlaygroundController@store',   ['auth', 'csrf'], 'playground.manage'],
    ['GET',  '/playgrounds/{id:\d+}',           'PlaygroundAdmin\Controllers\PlaygroundController@show',    ['auth'], 'playground.view'],
    ['GET',  '/playgrounds/{id:\d+}/edit',      'PlaygroundAdmin\Controllers\PlaygroundController@edit',    ['auth'], 'playground.manage'],
    ['POST', '/playgrounds/{id:\d+}',           'PlaygroundAdmin\Controllers\PlaygroundController@update',  ['auth', 'csrf'], 'playground.manage'],
    ['POST', '/playgrounds/{id:\d+}/toggle',    'PlaygroundAdmin\Controllers\PlaygroundController@toggle',  ['auth', 'csrf'], 'playground.manage'],

    // Mirror View
    ['GET',  '/playgrounds/{id:\d+}/mirror',          'PlaygroundAdmin\Controllers\PlaygroundMirrorController@mirror',      ['auth'], 'playground.view'],
    ['GET',  '/playgrounds/{id:\d+}/mirror/{date}',   'PlaygroundAdmin\Controllers\PlaygroundMirrorController@mirrorDate',  ['auth'], 'playground.view'],
    ['GET',  '/playgrounds/{id:\d+}/mirror/state',    'PlaygroundAdmin\Controllers\PlaygroundMirrorController@mirrorState', ['auth'], 'playground.view'],

    // Monthly Schedules
    ['GET',  '/playgrounds/{id:\d+}/schedules',                                   'PlaygroundAdmin\Controllers\PlaygroundScheduleController@schedules',       ['auth'], 'playground.schedule'],
    ['GET',  '/playgrounds/{id:\d+}/schedules/create',                            'PlaygroundAdmin\Controllers\PlaygroundScheduleController@createSchedule',  ['auth'], 'playground.schedule'],
    ['POST', '/playgrounds/{id:\d+}/schedules',                                   'PlaygroundAdmin\Controllers\PlaygroundScheduleController@storeSchedule',   ['auth', 'csrf'], 'playground.schedule'],
    ['GET',  '/playgrounds/{id:\d+}/schedules/{schedId:\d+}',                     'PlaygroundAdmin\Controllers\PlaygroundScheduleController@showSchedule',    ['auth'], 'playground.schedule'],
    ['GET',  '/playgrounds/{id:\d+}/schedules/{schedId:\d+}/edit',                'PlaygroundAdmin\Controllers\PlaygroundScheduleController@editSchedule',    ['auth'], 'playground.schedule'],
    ['POST', '/playgrounds/{id:\d+}/schedules/{schedId:\d+}',                     'PlaygroundAdmin\Controllers\PlaygroundScheduleController@updateSchedule',  ['auth', 'csrf'], 'playground.schedule'],
    ['GET',  '/playgrounds/{id:\d+}/schedules/{schedId:\d+}/slots/{date}/{hour}', 'PlaygroundAdmin\Controllers\PlaygroundScheduleController@slotEditor',      ['auth'], 'playground.schedule'],
    ['POST', '/playgrounds/{id:\d+}/schedules/{schedId:\d+}/slots/{date}/{hour}', 'PlaygroundAdmin\Controllers\PlaygroundScheduleController@saveSlot',        ['auth', 'csrf'], 'playground.schedule'],

    // Attendance
    ['GET',  '/playgrounds/{id:\d+}/attendance',        'PlaygroundAdmin\Controllers\PlaygroundAttendanceController@index',  ['auth'], 'playground.attendance'],
    ['POST', '/playgrounds/{id:\d+}/attendance',        'PlaygroundAdmin\Controllers\PlaygroundAttendanceController@store',  ['auth', 'csrf'], 'playground.attendance'],
    ['POST', '/playgrounds/{id:\d+}/attendance/remind', 'PlaygroundAdmin\Controllers\PlaygroundAttendanceController@remind', ['auth', 'csrf'], 'playground.attendance'],

    // Per-Playground Dashboard
    ['GET',  '/playgrounds/{id:\d+}/dashboard',         'PlaygroundAdmin\Controllers\PlaygroundDashboardController@dashboard', ['auth'], 'playground.dashboard'],
    ['GET',  '/playgrounds/{id:\d+}/dashboard/export',  'PlaygroundAdmin\Controllers\PlaygroundDashboardController@export',    ['auth'], 'playground.dashboard'],

    // Club-wide Sports Dashboard
    ['GET',  '/sports-dashboard',        'PlaygroundAdmin\Controllers\ClubSportsDashboardController@index',  ['auth'], 'playground.dashboard'],
    ['GET',  '/sports-dashboard/export', 'PlaygroundAdmin\Controllers\ClubSportsDashboardController@export', ['auth'], 'playground.dashboard'],
];
