<?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/edit/{code}',                  'Workflow\Controllers\WorkflowController@edit',            ['auth', 'csrf'], 'rules.edit'],
    ['POST', '/workflows/edit/{code}',                  'Workflow\Controllers\WorkflowController@update',          ['auth', 'csrf'], 'rules.edit'],
    ['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'],
    ['GET',  '/workflows/instances/{code}',             'Workflow\Controllers\WorkflowController@instances',       ['auth', 'csrf'], 'rules.view'],
    ['POST', '/workflows/process-timeouts',             'Workflow\Controllers\WorkflowController@processTimeouts', ['auth', 'csrf'], 'rules.edit'],
];