<?php
declare(strict_types=1);

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

MenuRegistry::register('forms', [
    'label_ar'   => 'النماذج',
    'label_en'   => 'Forms',
    'icon'       => '📋',
    'route'      => '/forms',
    'permission' => 'forms.view',
    'order'      => 160,
    'children'   => [
        ['label_ar' => 'النماذج المقدمة', 'label_en' => 'Submissions',  'route' => '/forms/submissions', 'permission' => 'forms.view',        'order' => 1],
        ['label_ar' => 'منشئ النماذج',   'label_en' => 'Form Builder', 'route' => '/forms/builder',     'permission' => 'forms.edit_schema', 'order' => 2],
    ],
]);

PermissionRegistry::register('forms', [
    'forms.view'         => ['ar' => 'عرض النماذج',       'en' => 'View Forms'],
    'forms.edit_schema'  => ['ar' => 'تعديل هيكل النماذج', 'en' => 'Edit Form Schemas'],
    'forms.create_schema' => ['ar' => 'إنشاء نموذج',      'en' => 'Create Form Schema'],
]);