<?php
declare(strict_types=1);

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

MenuRegistry::register('installments', [
    'label_ar' => 'الأقساط',
    'label_en' => 'Installments',
    'icon'       => 'calendar',
    'route'      => '/installments',
    'permission' => 'installment.view',
    'parent'     => null,
    'order'      => 510,
    'children'   => [
        ['label_ar' => 'كل الخطط', 'label_en' => 'All Plans', 'route' => '/installments', 'permission' => 'installment.view', 'order' => 1],
    ],
]);

PermissionRegistry::register('installments', [
    'installment.view'           => ['ar' => 'عرض الأقساط',       'en' => 'View Installments'],
    'installment.create_plan'    => ['ar' => 'إنشاء خطة تقسيط',   'en' => 'Create Installment Plan'],
    'installment.record_payment' => ['ar' => 'تسجيل دفعة قسط',    'en' => 'Record Installment Payment'],
    'installment.modify_plan'    => ['ar' => 'تعديل خطة التقسيط', 'en' => 'Modify Installment Plan'],
]);