<?php
declare(strict_types=1);

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

MenuRegistry::register('subscriptions', [
    'label_ar' => 'الاشتراكات السنوية',
    'label_en' => 'Annual Subscriptions',
    'icon'       => 'repeat',
    'route'      => '/subscriptions',
    'permission' => 'subscription.view',
    'parent'     => null,
    'order'      => 520,
    'children'   => [
        ['label_ar' => 'كل الاشتراكات',  'label_en' => 'All Subscriptions',  'route' => '/subscriptions',               'permission' => 'subscription.view',           'order' => 1],
        ['label_ar' => 'توليد دفعة',     'label_en' => 'Batch Generate',     'route' => '/subscriptions/batch-generate', 'permission' => 'subscription.generate_batch', 'order' => 2],
    ],
]);

PermissionRegistry::register('subscriptions', [
    'subscription.view'           => ['ar' => 'عرض الاشتراكات',  'en' => 'View Subscriptions'],
    'subscription.collect'        => ['ar' => 'تحصيل اشتراك',    'en' => 'Collect Subscription'],
    'subscription.exempt'         => ['ar' => 'إعفاء من اشتراك', 'en' => 'Exempt Subscription'],
    'subscription.generate_batch' => ['ar' => 'توليد اشتراكات',  'en' => 'Generate Batch'],
]);