<?php
return [
    // ─── Facilities ───
    ['GET',  '/facilities',                    'FacilityController@index',       'facilities.view'],
    ['GET',  '/facilities/create',             'FacilityController@create',      'facilities.manage'],
    ['POST', '/facilities',                    'FacilityController@store',       'facilities.manage'],
    ['GET',  '/facilities/types',              'FacilityController@types',       'facilities.manage'],
    ['GET',  '/facilities/types/create',       'FacilityController@createType',  'facilities.manage'],
    ['POST', '/facilities/types',              'FacilityController@storeType',   'facilities.manage'],
    ['GET',  '/facilities/types/{id}/edit',    'FacilityController@editType',    'facilities.manage'],
    ['POST', '/facilities/types/{id}',         'FacilityController@updateType',  'facilities.manage'],
    ['GET',  '/facilities/pools',              'FacilityController@pools',       'facilities.view'],
    ['POST', '/facilities/pools/readings',     'FacilityController@storeReading','facilities.manage'],
    ['GET',  '/facilities/parking',            'FacilityController@parking',     'facilities.view'],
    ['POST', '/facilities/parking/permits',    'FacilityController@storePermit', 'facilities.manage'],
    ['GET',  '/facilities/{id}',               'FacilityController@show',        'facilities.view'],
    ['GET',  '/facilities/{id}/edit',          'FacilityController@edit',        'facilities.manage'],
    ['POST', '/facilities/{id}',               'FacilityController@update',      'facilities.manage'],
    ['GET',  '/facilities/{id}/maintenance',   'FacilityController@maintenance', 'facilities.manage'],
    ['POST', '/facilities/{id}/maintenance',   'FacilityController@storeMaintenance', 'facilities.manage'],

    // ─── Bookings ───
    ['GET',  '/bookings',                      'BookingController@index',        'bookings.view'],
    ['GET',  '/bookings/create',               'BookingController@create',       'bookings.create'],
    ['POST', '/bookings',                      'BookingController@store',        'bookings.create'],
    ['GET',  '/bookings/calendar/{id}',        'BookingController@calendar',     'bookings.view'],
    ['POST', '/bookings/{id}/status',          'BookingController@updateStatus', 'bookings.manage'],

    // ─── Events ───
    ['GET',  '/events',                        'EventController@index',          'events.view'],
    ['GET',  '/events/create',                 'EventController@create',         'events.manage'],
    ['POST', '/events',                        'EventController@store',          'events.manage'],
    ['GET',  '/events/{id}',                   'EventController@show',           'events.view'],
    ['GET',  '/events/{id}/edit',              'EventController@edit',           'events.manage'],
    ['POST', '/events/{id}',                   'EventController@update',         'events.manage'],
    ['POST', '/events/{id}/register',          'EventController@register',       'events.manage'],
    ['POST', '/events/{id}/checkin',           'EventController@checkin',        'events.manage'],

    // ─── API Endpoints ───
    ['GET',  '/api/facilities/list',           'FacilityApiController@list',             'facilities.view'],
    ['GET',  '/api/facilities/types/list',     'FacilityApiController@typesList',         'facilities.manage'],
    ['GET',  '/api/bookings/list',             'FacilityApiController@bookingsList',      'bookings.view'],
    ['GET',  '/api/bookings/calendar/{id}',    'FacilityApiController@calendarData',      'bookings.view'],
    ['GET',  '/api/bookings/availability',     'FacilityApiController@checkAvailability', 'bookings.create'],
    ['GET',  '/api/events/list',               'FacilityApiController@eventsList',        'events.view'],
    ['GET',  '/api/events/{id}/registrations', 'FacilityApiController@eventRegistrations','events.view'],
    ['GET',  '/api/facilities/maintenance/{id}','FacilityApiController@maintenanceList',  'facilities.manage'],
    ['GET',  '/api/facilities/pools/readings/{id}','FacilityApiController@poolReadings',  'facilities.view'],
    ['GET',  '/api/facilities/parking/permits', 'FacilityApiController@permitsList',      'facilities.view'],
    ['GET',  '/api/facilities/parking/log',     'FacilityApiController@parkingLog',       'facilities.view'],
];