<?php
declare(strict_types=1);

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

PermissionRegistry::register('rentals', [
    'rental.view'            => ['ar' => 'عرض الإيجارات',      'en' => 'View Rentals'],
    'rental.manage_entity'   => ['ar' => 'إدارة كيانات الإيجار','en' => 'Manage Rental Entities'],
    'rental.manage_contract' => ['ar' => 'إدارة عقود الإيجار',  'en' => 'Manage Rental Contracts'],
    'rental.approve'         => ['ar' => 'اعتماد الإيجارات',    'en' => 'Approve Rentals'],
    'rental.manage_deposit'  => ['ar' => 'إدارة تأمينات الإيجار','en' => 'Manage Rental Deposits'],
]);

MenuRegistry::register('rentals', [
    'label_ar'   => 'الإيجارات',
    'label_en'   => 'Rentals',
    'icon'       => 'building-2',
    'route'      => '/rentals',
    'permission' => 'rental.view',
    'order'      => 290,
    'children'   => [
        ['label_ar' => 'عقود الإيجار', 'label_en' => 'Contracts', 'route' => '/rentals',           'permission' => 'rental.view',            'order' => 1],
        ['label_ar' => 'الكيانات',     'label_en' => 'Entities',  'route' => '/rentals/entities',  'permission' => 'rental.manage_entity',   'order' => 2],
    ],
]);
