<aside id="aside">

    <a href="" class="aside-brand d-block ">
        <img src="{{ website_logo() }}" alt="">
        <span class="name"></span>
    </a>


    <ul class="side-menu">


        @can('interest_allow_view')
            <x-dashboard.aside :details="[
                'name' => 'رسائل الاهتمام',
                'icon' => '<i class=\'fa-solid fa-envelope\'></i>',
                'link' => 'interests',
            ]" />
        @endcan



        <x-dashboard.aside :details="[
            'name' => 'الإعلانات العقارية',
            'icon' => '<i class=\'fa-solid fa-house\'></i>',
            'link' => 'properties',
        ]" />

        @can('properties_create')
            <x-dashboard.aside :details="[
                'name' => 'اضافة إعلان جديد',
                'icon' => '<i class=\'fa fa-plus\'></i>',
                'link' => 'properties/create',
            ]" />
        @endcan




        <!--
         |
         | Start System Tabs
         |
        -->

        @can('admins')
            <li class="side-item-category">الإدارة</li>
            <x-dashboard.aside :details="[
                'name' => 'المستخدمين',
                'icon' => '<i class=\'fa-solid fa-users\'></i>',
                'link' => 'admins',
            ]" /><!-- End Admins -->
        @endcan


        @can('create_admin')
            <x-dashboard.aside :details="[
                'name' => 'اضافة مستخدم جديد',
                'icon' => '<i class=\'fa-solid fa-user-plus\'></i>',
                'link' => 'admins/create',
            ]" /><!-- End Admins -->
        @endcan




        <li class="side-item-category">النظام</li>


        @canany(['city_view', 'neighborhood_view', 'property_status_view', 'property_furnishing_view',
            'property_features_view', 'property_amenities_view'])
            <x-dashboard.aside :details="[
                'name' => 'بيانات النظام',
                'icon' => '<i class=\'fa-solid fa-circle-question\'></i>',
                'sub_menu' => [
                    [
                        'name' => 'المدن',
                        'link' => 'cities',
                        'can' => 'city_view',
                    ],
                    [
                        'name' => 'المناطق',
                        'link' => 'neighborhoods',
                        'can' => 'neighborhood_view',
                    ],
                    [
                        'name' => 'الحالة & الغرض',
                        'link' => 'property-status',
                        'can' => 'property_status_view',
                    ],
                    [
                        'name' => 'مستويات التشطيب',
                        'link' => 'property-furnishing',
                        'can' => 'property_furnishing_view',
                    ],
                    [
                        'name' => 'أنواع المميزات',
                        'link' => 'property-features',
                        'can' => 'property_features_view',
                    ],
                    [
                        'name' => 'وسائل الراحة',
                        'link' => 'property-amenities',
                        'can' => 'property_amenities_view',
                    ],
                ],
            ]" />
            <!-- settings -->
        @endcanany

        @role(owner())
            <x-dashboard.aside :details="[
                'name' => 'الأدوار & الصلاحيات',
                'icon' => '<i class=\'fa-solid fa-unlock\'></i>',
                'link' => 'roles',
            ]" /><!-- End roles -->
        @endrole


        @can('website_setting_allow_edit_and_view')
            <x-dashboard.aside :details="[
                'name' => 'إعدادات الموقع',
                'icon' => '<i class=\'fa-solid fa-gear\'></i>',
                'link' => 'settings/general',
            ]" />
            <!-- settings -->
        @endcan



        <li class="side-item ">
            <a href="{{ url('') }}" target="__blank" class=" w-100 d-block">
                <span class="side-icon"><i class='fa-solid fa-chart-simple'></i></span>
                <span class="side-name-lable">صفحة التسويق</span>
            </a>
        </li>

        <li class="side-item mb-5">
            <form action="{{ route('logout') }}" method="POST">
                @csrf
                <button type="submit" class=" w-100 d-block">
                    <a class=" w-100 d-block">
                        <span class="side-icon"><i class="fa-solid fa-arrow-right-to-bracket"></i></span>
                        <span class="side-name-lable">{{ trans('aside.Logout') }}</span>
                    </a>
                </button>
            </form>
        </li>
        <!-- End Logout -->

    </ul>

    <a style="font-size: 15px;position: absolute;bottom: 15px;left: 30%;" class="text-secondary" href="https://salehmegawer.com/" target="_blank"><i class="fa-solid fa-arrow-right ml-2" style="font-size: 13px"></i>By Saleh Megawer</a>
</aside><!-- End Aside Bar  -->

<div class="aside-overlay"></div>
<!---OverLay -->
