<?php
declare(strict_types=1);

return [
    ['GET',  '/members/archive',              'Members\Controllers\MemberArchiveController@index',  ['auth'], 'member.archive'],
    ['GET',  '/members/archive/{id:\d+}',    'Members\Controllers\MemberArchiveController@show',   ['auth'], 'member.archive'],
    ['GET',  '/members',                     'Members\Controllers\MemberController@index',        ['auth'], 'member.view'],
    ['GET',  '/members/create',              'Members\Controllers\MemberController@create',       ['auth'], 'member.create'],
    ['POST', '/members',                     'Members\Controllers\MemberController@store',        ['auth', 'csrf'], 'member.create'],
    ['GET',  '/members/search',              'Members\Controllers\MemberController@search',       ['auth'], 'member.view'],
    // Retroactive Wizard (super admin only)
    ['GET',  '/members/retroactive-wizard',  'Members\Controllers\RetroactiveWizardController@index', ['auth'], 'member.create'],
    ['POST', '/members/retroactive-wizard',  'Members\Controllers\RetroactiveWizardController@store', ['auth', 'csrf'], 'member.create'],
    ['POST', '/members/retroactive-wizard/preview', 'Members\Controllers\RetroactiveWizardController@preview', ['auth', 'csrf'], 'member.create'],
    ['GET',  '/members/{id}',                'Members\Controllers\MemberController@show',         ['auth'], 'member.view'],
    ['GET',  '/members/{id}/edit',           'Members\Controllers\MemberController@edit',         ['auth'], 'member.edit'],
    ['POST', '/members/{id}',                'Members\Controllers\MemberController@update',       ['auth', 'csrf'], 'member.edit'],
    ['POST', '/members/{id}/photo',           'Members\Controllers\MemberController@uploadPhoto',   ['auth', 'csrf'], 'member.edit'],
    ['POST', '/members/{id}/status',         'Members\Controllers\MemberController@changeStatus', ['auth', 'csrf'], 'member.change_status'],
    ['POST', '/members/{id}/pay-form-fee',   'Members\Controllers\MemberController@payFormFee',   ['auth', 'csrf'], 'member.pay_form_fee'],
    ['POST', '/members/{id}/pay-membership', 'Members\Controllers\MemberController@payMembership',['auth', 'csrf'], 'member.pay_membership'],
    ['POST', '/members/{id}/apply-discount','Members\Controllers\MemberController@applyDiscount', ['auth', 'csrf'], 'member.edit'],
    ['POST', '/members/{id}/pay-addition',  'Members\Controllers\MemberController@payAdditionFee', ['auth', 'csrf'], 'member.pay_membership'],
    ['GET',  '/members/{id}/fill-form',      'Members\Controllers\MemberController@fillForm',     ['auth'], 'member.fill_form'],
    ['POST', '/members/{id}/fill-form',      'Members\Controllers\MemberController@saveFillForm', ['auth', 'csrf'], 'member.fill_form'],
    ['GET',  '/members/{id}/changelog',      'Members\Controllers\MemberController@changelog',    ['auth'], 'member.view'],
    ['GET',  '/members/{id}/insurance-record', 'Members\Controllers\MemberController@insuranceRecord', ['auth'], 'member.view'],
    ['POST', '/api/members/parse-nid',       'Members\Controllers\MemberApiController@parseNid',  ['auth'], 'member.create'],
    ['POST', '/api/members/check-nid',       'Members\Controllers\MemberApiController@checkNid',  ['auth'], 'member.view'],
    ['GET',  '/api/members/search',          'Members\Controllers\MemberApiController@searchGet', ['auth'], 'member.view'],
    ['POST', '/api/members/search',          'Members\Controllers\MemberApiController@search',    ['auth'], 'member.view'],
    ['GET',  '/api/members/{id}/debts',      'Members\Controllers\MemberApiController@debts',     ['auth'], 'member.view'],
    // Reports
    ['GET',  '/reports',                     'Members\Controllers\ReportController@index',         ['auth'], 'member.reports'],
    ['GET',  '/reports/children-aging',      'Members\Controllers\ReportController@childrenAgingOut', ['auth'], 'member.reports'],
    ['GET',  '/reports/transfers',           'Members\Controllers\ReportController@transfers',     ['auth'], 'member.reports'],
    ['GET',  '/reports/waivers',             'Members\Controllers\ReportController@waivers',       ['auth'], 'member.reports'],
    ['GET',  '/reports/subscription-status', 'Members\Controllers\ReportController@subscriptionStatus', ['auth'], 'member.reports'],
    ['GET',  '/reports/age-report',          'Members\Controllers\ReportController@ageReport',     ['auth'], 'member.reports'],
    ['GET',  '/reports/unpaid-debts',        'Members\Controllers\ReportController@unpaidDebts',   ['auth'], 'member.reports'],
];