<?php
declare(strict_types=1);

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

PermissionRegistry::register('reservations', [
    'reservation.view'    => ['ar' => 'عرض الحجوزات',    'en' => 'View Reservations'],
    'reservation.create'  => ['ar' => 'إنشاء حجز',       'en' => 'Create Reservation'],
    'reservation.confirm' => ['ar' => 'تأكيد الحجوزات',  'en' => 'Confirm Reservations'],
    'reservation.cancel'  => ['ar' => 'إلغاء الحجوزات',  'en' => 'Cancel Reservations'],
]);

MenuRegistry::register('reservations', [
    'label_ar'   => 'الحجوزات',
    'label_en'   => 'Reservations',
    'icon'       => 'calendar-check',
    'route'      => '/reservations',
    'permission' => 'reservation.view',
    'parent'     => null,
    'order'      => 240,
    'children'   => [
        ['label_ar' => 'جميع الحجوزات',   'label_en' => 'All Reservations',  'route' => '/reservations',          'permission' => 'reservation.view',   'order' => 1],
        ['label_ar' => 'التقويم',          'label_en' => 'Calendar',          'route' => '/reservations/calendar', 'permission' => 'reservation.view',   'order' => 2],
        ['label_ar' => 'مباريات خاصة',     'label_en' => 'Private Matches',   'route' => '/private-matches',       'permission' => 'reservation.view',   'order' => 3],
        ['label_ar' => 'حجز جديد',         'label_en' => 'New Booking',       'route' => '/reservations/create',   'permission' => 'reservation.create', 'order' => 4],
    ],
]);
