<?php
declare(strict_types=1);

return [
    ['GET',  '/carnets',                       'Carnets\Controllers\CarnetController@index',      ['auth'], 'carnet.view'],
    ['GET',  '/carnets/issue/{memberId}',      'Carnets\Controllers\CarnetController@issue',      ['auth'], 'carnet.issue'],
    ['POST', '/carnets/issue/{memberId}',      'Carnets\Controllers\CarnetController@issue',      ['auth', 'csrf'], 'carnet.issue'],
    ['GET',  '/carnets/{id}/print',            'Carnets\Controllers\CarnetController@print',      ['auth'], 'carnet.print'],
    ['POST', '/carnets/{id}/deactivate',       'Carnets\Controllers\CarnetController@deactivate', ['auth', 'csrf'], 'carnet.deactivate'],
    ['GET',  '/carnets/replace/{memberId}',    'Carnets\Controllers\CarnetController@replace',    ['auth'], 'carnet.issue'],
    ['POST', '/carnets/issue/{memberId}/{type}/{dependentId}', 'Carnets\Controllers\CarnetController@issueDependent', ['auth', 'csrf'], 'carnet.issue'],
    ['GET',  '/carnets/{id}/print-dependent',  'Carnets\Controllers\CarnetController@printDependent', ['auth'], 'carnet.print'],

    // Guest Entries (Invitation Usage)
    ['GET',  '/carnets/guest-entries',                    'Carnets\Controllers\GuestEntryController@index',         ['auth'], 'carnet.view_guests'],
    ['GET',  '/carnets/guest-entries/create',             'Carnets\Controllers\GuestEntryController@create',        ['auth'], 'carnet.record_guest'],
    ['POST', '/carnets/guest-entries',                    'Carnets\Controllers\GuestEntryController@store',         ['auth', 'csrf'], 'carnet.record_guest'],
    ['POST', '/carnets/guest-entries/{id:\d+}/checkout',  'Carnets\Controllers\GuestEntryController@checkout',      ['auth', 'csrf'], 'carnet.record_guest'],
    ['POST', '/carnets/guest-entries/{id:\d+}/cancel',    'Carnets\Controllers\GuestEntryController@cancel',        ['auth', 'csrf'], 'carnet.record_guest'],
    ['GET',  '/api/carnets/member/{memberId:\d+}/summary','Carnets\Controllers\GuestEntryController@memberSummary', ['auth'], 'carnet.view_guests'],
];