<?php
declare(strict_types=1);

return [
    // Dashboard
    ['GET',  '/treasury',                         'Treasury\Controllers\TreasuryController@dashboard',        ['auth'], 'treasury.view_dashboard'],

    // Payment queue
    ['GET',  '/treasury/queue',                   'Treasury\Controllers\TreasuryController@queue',             ['auth'], 'treasury.collect_payment'],
    ['GET',  '/treasury/queue/{id:\d+}',          'Treasury\Controllers\TreasuryController@processForm',      ['auth'], 'treasury.collect_payment'],
    ['POST', '/treasury/queue/{id:\d+}/collect',  'Treasury\Controllers\TreasuryController@collect',           ['auth', 'csrf'], 'treasury.collect_payment'],
    ['POST', '/treasury/collect',                 'Treasury\Controllers\TreasuryController@createAndCollect',  ['auth', 'csrf'], 'treasury.collect_payment'],

    // Sessions
    ['GET',  '/treasury/sessions',                'Treasury\Controllers\SessionController@index',              ['auth'], 'treasury.view_sessions'],
    ['GET',  '/treasury/sessions/current',        'Treasury\Controllers\SessionController@current',            ['auth'], 'treasury.open_session'],
    ['POST', '/treasury/sessions/open',           'Treasury\Controllers\SessionController@open',               ['auth', 'csrf'], 'treasury.open_session'],
    ['POST', '/treasury/sessions/{id:\d+}/close', 'Treasury\Controllers\SessionController@close',              ['auth', 'csrf'], 'treasury.close_session'],

    // Settlements
    ['GET',  '/treasury/settlements',             'Treasury\Controllers\SettlementController@index',           ['auth'], 'treasury.view_settlements'],
    ['GET',  '/treasury/settlements/create',      'Treasury\Controllers\SettlementController@create',          ['auth'], 'treasury.initiate_settlement'],
    ['POST', '/treasury/settlements',             'Treasury\Controllers\SettlementController@store',            ['auth', 'csrf'], 'treasury.initiate_settlement'],
    ['GET',  '/treasury/settlements/{id:\d+}',    'Treasury\Controllers\SettlementController@show',            ['auth'], 'treasury.view_settlements'],

    // Custody
    ['GET',  '/treasury/custody',                 'Treasury\Controllers\TreasuryController@custody',           ['auth'], 'treasury.view_custody'],
];
