<?php
declare(strict_types=1);

return [
    ['GET',  '/installments',                           'Installments\Controllers\InstallmentController@index',          ['auth'], 'installment.view'],
    ['GET',  '/installments/create/{memberId}',         'Installments\Controllers\InstallmentController@create',         ['auth'], 'installment.create'],
    ['POST', '/installments/store/{memberId}',          'Installments\Controllers\InstallmentController@store',          ['auth', 'csrf'], 'installment.create_plan'],
    ['GET',  '/installments/{id}',                      'Installments\Controllers\InstallmentController@show',           ['auth'], 'installment.view'],
    ['POST', '/installments/{planId}/pay/{scheduleId}', 'Installments\Controllers\InstallmentController@payInstallment', ['auth', 'csrf'], 'installment.pay'],
    ['POST', '/installments/{id}/recalculate',          'Installments\Controllers\InstallmentController@recalculate',    ['auth', 'csrf'], 'installment.create_plan'],

    // Cheque uploads
    ['GET',  '/installments/{planId}/cheques',           'Installments\Controllers\ChequeController@index',              ['auth'], 'installment.view'],
    ['POST', '/installments/{planId}/cheques',           'Installments\Controllers\ChequeController@store',              ['auth', 'csrf'], 'installment.create_plan'],
];