<?php
declare(strict_types=1);

return [
    ['GET',  '/rentals',                                    'Rentals\Controllers\RentalController@index',           ['auth'], 'rental.view'],
    ['GET',  '/rentals/entities',                           'Rentals\Controllers\RentalController@entities',        ['auth'], 'rental.view'],
    ['GET',  '/rentals/entities/create',                    'Rentals\Controllers\RentalController@createEntity',    ['auth'], 'rental.manage_entity'],
    ['POST', '/rentals/entities',                           'Rentals\Controllers\RentalController@storeEntity',     ['auth', 'csrf'], 'rental.manage_entity'],
    ['GET',  '/rentals/entities/{id:\d+}',                  'Rentals\Controllers\RentalController@showEntity',      ['auth'], 'rental.view'],
    ['GET',  '/rentals/entities/{id:\d+}/edit',             'Rentals\Controllers\RentalController@editEntity',      ['auth'], 'rental.manage_entity'],
    ['POST', '/rentals/entities/{id:\d+}',                  'Rentals\Controllers\RentalController@updateEntity',    ['auth', 'csrf'], 'rental.manage_entity'],
    ['GET',  '/rentals/contracts/create',                   'Rentals\Controllers\RentalController@createContract',  ['auth'], 'rental.manage_contract'],
    ['POST', '/rentals/contracts',                          'Rentals\Controllers\RentalController@storeContract',   ['auth', 'csrf'], 'rental.manage_contract'],
    ['GET',  '/rentals/contracts/{id:\d+}',                 'Rentals\Controllers\RentalController@showContract',    ['auth'], 'rental.view'],
    ['POST', '/rentals/contracts/{id:\d+}/approve',         'Rentals\Controllers\RentalController@approveContract', ['auth', 'csrf'], 'rental.approve'],
    ['POST', '/rentals/contracts/{id:\d+}/deposit/collect', 'Rentals\Controllers\RentalController@collectDeposit',  ['auth', 'csrf'], 'rental.manage_deposit'],
    ['POST', '/rentals/contracts/{id:\d+}/deposit/refund',  'Rentals\Controllers\RentalController@refundDeposit',   ['auth', 'csrf'], 'rental.manage_deposit'],
];
