<?php
declare(strict_types=1);

return [
    // Payment queue
    ['GET',  '/cashier',              'Cashier\Controllers\CashierController@queue',    ['auth'], 'cashier.view_queue'],
    ['GET',  '/cashier/{id:\d+}',     'Cashier\Controllers\CashierController@process',  ['auth'], 'cashier.process_payment'],
    ['POST', '/cashier/{id:\d+}/complete', 'Cashier\Controllers\CashierController@complete', ['auth', 'csrf'], 'cashier.process_payment'],
    ['POST', '/cashier/{id:\d+}/cancel',  'Cashier\Controllers\CashierController@cancel',   ['auth', 'csrf'], 'cashier.cancel_request'],
    ['POST', '/cashier/{id:\d+}/requeue', 'Cashier\Controllers\CashierController@requeue',  ['auth', 'csrf'], 'cashier.cancel_request'],

    // Settlement receiving (from sub-treasuries)
    ['GET',  '/cashier/settlements',                  'Cashier\Controllers\SettlementReceiveController@index',   ['auth'], 'cashier.receive_settlement'],
    ['POST', '/cashier/settlements/{id:\d+}/receive', 'Cashier\Controllers\SettlementReceiveController@receive', ['auth', 'csrf'], 'cashier.receive_settlement'],
    ['POST', '/cashier/settlements/{id:\d+}/reject',  'Cashier\Controllers\SettlementReceiveController@reject',  ['auth', 'csrf'], 'cashier.receive_settlement'],

    // Bank deposits
    ['GET',  '/cashier/deposits',                  'Cashier\Controllers\DepositController@index',   ['auth'], 'cashier.manage_deposits'],
    ['GET',  '/cashier/deposits/create',           'Cashier\Controllers\DepositController@create',  ['auth'], 'cashier.manage_deposits'],
    ['POST', '/cashier/deposits',                  'Cashier\Controllers\DepositController@store',   ['auth', 'csrf'], 'cashier.manage_deposits'],
    ['GET',  '/cashier/deposits/{id:\d+}',         'Cashier\Controllers\DepositController@show',    ['auth'], 'cashier.manage_deposits'],
    ['POST', '/cashier/deposits/{id:\d+}/confirm', 'Cashier\Controllers\DepositController@confirm', ['auth', 'csrf'], 'cashier.confirm_deposit'],
    ['POST', '/cashier/deposits/{id:\d+}/reject',  'Cashier\Controllers\DepositController@reject',  ['auth', 'csrf'], 'cashier.confirm_deposit'],
];
