<?php
declare(strict_types=1);

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

MenuRegistry::register('notifications', [
    'label_ar'   => 'الإخطارات',
    'label_en'   => 'Notifications',
    'icon'       => 'bell',
    'route'      => '/notifications/log',
    'permission' => 'sms.view_log',
    'parent'     => null,
    'order'      => 900,
    'children'   => [
        ['label_ar' => 'سجل الرسائل',  'label_en' => 'SMS Log',       'route' => '/notifications/log',       'permission' => 'sms.view_log',       'order' => 1],
        ['label_ar' => 'إرسال رسالة',  'label_en' => 'Send SMS',      'route' => '/notifications/send',      'permission' => 'sms.send_single',    'order' => 2],
        ['label_ar' => 'القوالب',       'label_en' => 'Templates',     'route' => '/notifications/templates', 'permission' => 'sms.edit_templates', 'order' => 3],
    ],
]);

PermissionRegistry::register('notifications', [
    'sms.send_single'    => ['ar' => 'إرسال رسالة فردية',   'en' => 'Send Single SMS'],
    'sms.send_bulk'      => ['ar' => 'إرسال رسائل جماعية',  'en' => 'Send Bulk SMS'],
    'sms.view_log'       => ['ar' => 'عرض سجل الرسائل',     'en' => 'View SMS Log'],
    'sms.edit_templates' => ['ar' => 'تعديل القوالب',        'en' => 'Edit Templates'],
]);