<?php
declare(strict_types=1);

use App\Core\Registries\MenuRegistry;
use App\Core\Registries\PermissionRegistry;

MenuRegistry::register('workflows', [
    'label_ar'   => 'دورات العمل',
    'label_en'   => 'Workflows',
    'icon'       => 'git-branch',
    'route'      => '/workflows',
    'permission' => 'rules.view',
    'order'      => 750,
    'children'   => [
        ['label_ar' => 'نظرة عامة',  'label_en' => 'Overview',  'route' => '/workflows',  'permission' => 'rules.view', 'order' => 1],
    ],
]);

PermissionRegistry::register('workflows', [
    'workflow.view'       => ['ar' => 'عرض دورات العمل',      'en' => 'View Workflows'],
    'workflow.transition' => ['ar' => 'تنفيذ الانتقالات',     'en' => 'Execute Transitions'],
    'workflow.manage'     => ['ar' => 'إدارة دورات العمل',    'en' => 'Manage Workflows'],
]);