<?php
declare(strict_types=1);

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

MenuRegistry::register('rules_pricing', [
    'label_ar'   => 'القواعد والتسعير',
    'label_en'   => 'Rules & Pricing',
    'icon'       => '⚙️',
    'route'      => '/rules',
    'permission' => 'rules.view',
    'order'      => 150,
    'children'   => [
        ['label_ar' => 'محرك القواعد',   'label_en' => 'Rules Engine',    'route' => '/rules',    'permission' => 'rules.view',   'order' => 1],
        ['label_ar' => 'التسعير',        'label_en' => 'Pricing',         'route' => '/pricing',  'permission' => 'pricing.view', 'order' => 2],
        ['label_ar' => 'كتالوج الخدمات', 'label_en' => 'Service Catalog', 'route' => '/catalog',  'permission' => 'pricing.view', 'order' => 3],
    ],
]);

PermissionRegistry::register('rules', [
    'rules.view'       => ['ar' => 'عرض القواعد',     'en' => 'View Rules'],
    'rules.edit'       => ['ar' => 'تعديل القواعد',    'en' => 'Edit Rules'],
    'rules.create'     => ['ar' => 'إنشاء قاعدة',     'en' => 'Create Rule'],
    'rules.deactivate' => ['ar' => 'تعطيل قاعدة',     'en' => 'Deactivate Rule'],
]);

PermissionRegistry::register('pricing', [
    'pricing.view'   => ['ar' => 'عرض التسعير',   'en' => 'View Pricing'],
    'pricing.edit'   => ['ar' => 'تعديل التسعير',  'en' => 'Edit Pricing'],
    'pricing.create' => ['ar' => 'إنشاء تسعير',   'en' => 'Create Pricing'],
]);