<?php
declare(strict_types=1);

return [
    ['GET',  '/workflows',                              'Workflow\Controllers\WorkflowController@index',           ['auth', 'csrf'], 'rules.view'],
    ['GET',  '/workflows/diagram/{code}',               'Workflow\Controllers\WorkflowController@diagram',         ['auth', 'csrf'], 'rules.view'],
    ['GET',  '/workflows/instances/{code}',             'Workflow\Controllers\WorkflowController@instances',       ['auth', 'csrf'], 'rules.view'],
    ['GET',  '/workflows/instances/{id:\d+}',           'Workflow\Controllers\WorkflowController@instance',        ['auth', 'csrf'], 'rules.view'],
    ['POST', '/workflows/instances/{id:\d+}/transition','Workflow\Controllers\WorkflowController@transition',      ['auth', 'csrf'], 'rules.edit'],
    ['POST', '/workflows/process-timeouts',             'Workflow\Controllers\WorkflowController@processTimeouts', ['auth', 'csrf'], 'rules.edit'],
];