<?php
return [
    // ── Cards ──
    ['GET',  '/cards',                              'CardController@index',            'cards.view'],
    ['GET',  '/cards/show/{id}',                    'CardController@show',             'cards.view'],
    ['POST', '/cards/{id}/invalidate',              'CardController@invalidate',       'cards.manage'],

    // ── Card Requests ──
    ['GET',  '/cards/requests',                     'CardRequestController@index',     'cards.view'],
    ['GET',  '/cards/requests/create',              'CardRequestController@create',    'cards.manage'],
    ['POST', '/cards/requests',                     'CardRequestController@store',     'cards.manage'],
    ['POST', '/cards/requests/{id}/approve',        'CardRequestController@approve',   'cards.manage'],
    ['POST', '/cards/requests/{id}/reject',         'CardRequestController@reject',    'cards.manage'],
    ['POST', '/cards/requests/{id}/deliver',        'CardRequestController@deliver',   'cards.manage'],

    // ── Card Types ──
    ['GET',  '/cards/types',                        'CardTypeController@index',        'cards.manage'],
    ['POST', '/cards/types',                        'CardTypeController@store',        'cards.manage'],
    ['POST', '/cards/types/{id}',                   'CardTypeController@update',       'cards.manage'],

    // ── Card Print Batches ──
    ['GET',  '/cards/print-batches',                'CardPrintController@index',       'cards.print'],
    ['POST', '/cards/print-batches',                'CardPrintController@store',       'cards.print'],
    ['POST', '/cards/print-batches/{id}/process',   'CardPrintController@process',     'cards.print'],

    // ── Card API ──
    ['GET',  '/api/cards/datatable',                'CardApiController@datatable',     'cards.view'],
    ['GET',  '/api/cards/requests/datatable',       'CardApiController@requestsDatatable', 'cards.view'],
    ['GET',  '/api/cards/types/list',               'CardApiController@typesList',     'cards.view'],
    ['GET',  '/api/cards/print-batches/datatable',  'CardApiController@printDatatable','cards.print'],
    ['GET',  '/api/cards/print-batches/{id}/items', 'CardApiController@batchItems',    'cards.print'],

    // ── Access Points ──
    ['GET',  '/access/points',                      'AccessController@points',         'access.manage'],
    ['POST', '/access/points',                      'AccessController@storePoint',     'access.manage'],
    ['POST', '/access/points/{id}',                 'AccessController@updatePoint',    'access.manage'],

    // ── Access Rules ──
    ['GET',  '/access/rules',                       'AccessController@rules',          'access.manage'],
    ['POST', '/access/rules',                       'AccessController@storeRule',      'access.manage'],
    ['POST', '/access/rules/{id}',                  'AccessController@updateRule',     'access.manage'],
    ['POST', '/access/rules/{id}/delete',           'AccessController@deleteRule',     'access.manage'],

    // ── Access Log ──
    ['GET',  '/access/log',                         'AccessController@log',            'access.view'],

    // ── Access API ──
    ['GET',  '/api/access/points/datatable',        'AccessApiController@pointsDatatable', 'access.view'],
    ['GET',  '/api/access/rules/datatable',         'AccessApiController@rulesDatatable',  'access.manage'],
    ['GET',  '/api/access/log/datatable',           'AccessApiController@logDatatable',    'access.view'],
    ['POST', '/api/access/record',                  'AccessApiController@recordAccess',    'access.manage'],

    // ── Guest Passes ──
    ['GET',  '/guests',                             'GuestController@index',           'guests.view'],
    ['GET',  '/guests/create',                      'GuestController@create',          'guests.create'],
    ['POST', '/guests',                             'GuestController@store',           'guests.create'],
    ['GET',  '/guests/show/{id}',                   'GuestController@show',            'guests.view'],
    ['POST', '/guests/{id}/checkin',                'GuestController@checkin',         'guests.create'],
    ['POST', '/guests/{id}/checkout',               'GuestController@checkout',        'guests.create'],
    ['POST', '/guests/{id}/cancel',                 'GuestController@cancel',          'guests.create'],

    // ── Guest Blacklist ──
    ['GET',  '/guests/blacklist',                   'GuestController@blacklist',       'guests.view'],
    ['POST', '/guests/blacklist',                   'GuestController@storeBlacklist',  'guests.create'],
    ['POST', '/guests/blacklist/{id}/remove',       'GuestController@removeBlacklist', 'guests.create'],

    // ── Guest API ──
    ['GET',  '/api/guests/datatable',               'GuestApiController@datatable',          'guests.view'],
    ['GET',  '/api/guests/blacklist/datatable',     'GuestApiController@blacklistDatatable',  'guests.view'],
    ['GET',  '/api/guests/check-blacklist',         'GuestApiController@checkBlacklist',      'guests.create'],
    ['GET',  '/api/guests/pass-types',              'GuestApiController@passTypes',           'guests.view'],

    // ── Carnets ──
    ['GET',  '/carnets',                            'CarnetController@index',          'cards.view'],
    ['GET',  '/carnets/create',                     'CarnetController@create',         'cards.manage'],
    ['POST', '/carnets',                            'CarnetController@store',          'cards.manage'],
    ['GET',  '/carnets/show/{id}',                  'CarnetController@show',           'cards.view'],
    ['POST', '/carnets/{id}/entry',                 'CarnetController@recordEntry',    'cards.manage'],
    ['POST', '/carnets/{id}/void-entry/{entryId}',  'CarnetController@voidEntry',      'cards.manage'],

    // ── Carnet Types ──
    ['GET',  '/carnets/types',                      'CarnetController@types',          'cards.manage'],
    ['POST', '/carnets/types',                      'CarnetController@storeType',      'cards.manage'],
    ['POST', '/carnets/types/{id}',                 'CarnetController@updateType',     'cards.manage'],

    // ── Carnet API ──
    ['GET',  '/api/carnets/datatable',              'CarnetApiController@datatable',       'cards.view'],
    ['GET',  '/api/carnets/types/datatable',        'CarnetApiController@typesDatatable',  'cards.manage'],
    ['GET',  '/api/carnets/{id}/entries',            'CarnetApiController@entries',         'cards.view'],
];