<?php $__env->startSection('title', 'عرض المناطق'); ?>

<?php if (isset($component)) { $__componentOriginal87153cb05046bd89775d952622994180bb7c1b1e = $component; } ?>
<?php $component = App\View\Components\Dashboard\Css::resolve(['links' => [
    [
        'link' => 'services/services.css',
    ],
]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('dashboard.css'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Dashboard\Css::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal87153cb05046bd89775d952622994180bb7c1b1e)): ?>
<?php $component = $__componentOriginal87153cb05046bd89775d952622994180bb7c1b1e; ?>
<?php unset($__componentOriginal87153cb05046bd89775d952622994180bb7c1b1e); ?>
<?php endif; ?>

<?php $__env->startSection('content'); ?>

    <?php if (isset($component)) { $__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa = $component; } ?>
<?php $component = App\View\Components\Dashboard\LinksBar::resolve(['links' => [
        [
            'name' => 'عرض المناطق',
        ],
    ],'buttons' => [
        [
            'name' => 'عرض المدن',
            'class' => 'btn-main',
            'can' => 'city_view',
            'link' => adminUrl('cities'),
        ],
    ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('dashboard.links-bar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Dashboard\LinksBar::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa)): ?>
<?php $component = $__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa; ?>
<?php unset($__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa); ?>
<?php endif; ?><!-- links bar -->

    <section id="">
        <div class="row">

            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('neighborhood_create')): ?>
                <div class="col-lg-3 col-md-4">
                    <?php if (isset($component)) { $__componentOriginal91e80a119f881aea9c6213b3256cb8b2f369ed09 = $component; } ?>
<?php $component = App\View\Components\PanelWithHeading::resolve(['title' => ''.e($formOption['panelTitle']).''] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('panel-with-heading'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\PanelWithHeading::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
                        <form class=" form" action="<?php echo e($formOption['formAction']); ?>" method="POST" enctype="multipart/form-data">
                            <?php echo csrf_field(); ?>

                            <?php if(isset($editRow['id'])): ?>
                                <input type="hidden" name="id" value="<?php echo e($editRow['id']); ?>">
                                <?php echo method_field('PATCH'); ?>
                            <?php endif; ?>

                            <?php if (isset($component)) { $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a = $component; } ?>
<?php $component = App\View\Components\FormGroup::resolve(['properties' => [
                                'input' => [
                                    'name' => 'name',
                                    'type' => 'text',
                                    'value' => isset($editRow['name']) ? $editRow['name'] : '',
                                    'options' => ['required'],
                                ],
                                'label' => [
                                    'text' => 'اسم المنطقة',
                                    'options' => ['class' => 'required'],
                                ],
                            ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('form-group'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\FormGroup::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a)): ?>
<?php $component = $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a; ?>
<?php unset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a); ?>
<?php endif; ?><!-- name -->

                            <?php if (isset($component)) { $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a = $component; } ?>
<?php $component = App\View\Components\FormGroup::resolve(['properties' => [
                                'select' => [
                                    'name' => 'city_id',
                                    'list' => $cities,
                                    'selected' => isset($editRow['city_id']) ? $editRow['city_id'] : '',
                                    'options' => ['required', 'class' => 'font-17', 'placeholder' => 'اختر'],
                                ],
                                'label' => [
                                    'text' => 'المنطقة تابعة لمدينة ؟',
                                    'options' => ['class' => 'required'],
                                ],
                            ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('form-group'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\FormGroup::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a)): ?>
<?php $component = $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a; ?>
<?php unset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a); ?>
<?php endif; ?><!-- city -->

                            <button type="submit" class="btn btn-main btn-block "><?php echo e($formOption['submitButton']); ?></button>
                        </form>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal91e80a119f881aea9c6213b3256cb8b2f369ed09)): ?>
<?php $component = $__componentOriginal91e80a119f881aea9c6213b3256cb8b2f369ed09; ?>
<?php unset($__componentOriginal91e80a119f881aea9c6213b3256cb8b2f369ed09); ?>
<?php endif; ?>
                </div>
            <?php endif; ?>

            <div class="<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('neighborhood_create')): ?><?php echo e('col-lg-9 col-md-8'); ?> <?php else: ?> <?php echo e('col-12'); ?> <?php endif; ?>">

                <?php if (isset($component)) { $__componentOriginal91e80a119f881aea9c6213b3256cb8b2f369ed09 = $component; } ?>
<?php $component = App\View\Components\PanelWithHeading::resolve(['title' => 'قسم البحث'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('panel-with-heading'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\PanelWithHeading::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
                    <form action="" method="get">
                        <div class="row">

                            <div class="col-lg-4">
                                <?php if (isset($component)) { $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a = $component; } ?>
<?php $component = App\View\Components\FormGroup::resolve(['properties' => [
                                    'input' => [
                                        'name' => 'name',
                                        'type' => 'text',
                                        'value' => request('name'),
                                        'options' => ['placeholder' => 'ابحث باسم المنطقة'],
                                    ],
                                ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('form-group'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\FormGroup::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a)): ?>
<?php $component = $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a; ?>
<?php unset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a); ?>
<?php endif; ?><!-- filter name -->
                            </div>

                            <div class="col-lg-5">
                                <?php if (isset($component)) { $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a = $component; } ?>
<?php $component = App\View\Components\FormGroup::resolve(['properties' => [
                                    'select' => [
                                        'name' => 'city',
                                        'list' => $cities,
                                        'selected' => request('city'),
                                        'options' => ['placeholder' => 'اختر المدينة'],
                                    ],
                                ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('form-group'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\FormGroup::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a)): ?>
<?php $component = $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a; ?>
<?php unset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a); ?>
<?php endif; ?><!-- filter city -->
                            </div>

                            <?php if(request('city') != null || request('name') != null): ?>
                                <div class="col-lg-3">
                                    <div class="row">
                                        <div class="col-6">
                                            <button type="submit" class="btn btn-soft-main btn-block">بحث</button>
                                        </div><!-- submit search -->
                                        <div class="col-6 pr-0">
                                            <a href="<?php echo e(adminUrl('neighborhoods')); ?>" class="btn btn-danger btn-block">إلغاء
                                                البحث</a>
                                        </div><!-- clear search -->
                                    </div>
                                </div>
                            <?php else: ?>
                                <div class="col-lg-3">
                                    <button type="submit" class="btn btn-soft-main btn-block">بحث</button>
                                </div>
                            <?php endif; ?>

                        </div><!-- end row -->
                    </form>
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal91e80a119f881aea9c6213b3256cb8b2f369ed09)): ?>
<?php $component = $__componentOriginal91e80a119f881aea9c6213b3256cb8b2f369ed09; ?>
<?php unset($__componentOriginal91e80a119f881aea9c6213b3256cb8b2f369ed09); ?>
<?php endif; ?>

                <div class="box table-responsive">
                    <table class="table table-modern table-modern-sm table-inverse">
                        <thead class="thead-inverse">
                            <tr>
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(['neighborhood_edit', 'neighborhood_delete'])): ?>
                                    <th>التحكم</th>
                                <?php endif; ?>
                                <th>الاسم</th>
                                <th>تابعة إلي مدينة</th>
                                <th>تاريخ الإضافة</th>
                                <th>اضيف بواسطة</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $rows; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr class="parents">
                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(['neighborhood_edit', 'neighborhood_delete'])): ?>
                                        <td>
                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('neighborhood_edit')): ?>
                                                <a class="btn btn-sm btn-soft-primary" href="?edit=<?php echo e($row->id); ?>">
                                                    <i class="fa fa-edit"></i>
                                                </a>
                                                <span class="px-1">-</span>
                                            <?php endif; ?>

                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('neighborhood_delete')): ?>
                                                <form class="ajax-delete d-inline-block"
                                                    action="<?php echo e(route('neighborhood.destroy')); ?>" method="POST">
                                                    <?php echo method_field('DELETE'); ?>
                                                    <?php echo csrf_field(); ?>
                                                    <input type="hidden" class="id" name="id" value="<?php echo e($row->id); ?>">
                                                    <button type="submit" data-delete="هل انت متأكد من حذف : <?php echo e($row->name); ?>"
                                                        class="btn-delete-attech btn-sm btn btn-soft-danger">
                                                        <i class="fa fa-trash-alt"></i>
                                                    </button>
                                                </form>
                                            <?php endif; ?>
                                        </td>
                                    <?php endif; ?>

                                    <td><?php echo e($row->name); ?></td>
                                    <td><?php echo e($row->city->name); ?></td>
                                    <td><?php echo e($row->created_at->format('Y-m-d')); ?></td>
                                    <td><?php echo $row->by != null ? $row->by->full_name : "<small class='text-muted'>لا يوجد</small>"; ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div><!-- end box table -->

                <div class="mt-4 mb-5 pb-4">
                    <?php if (isset($component)) { $__componentOriginal29ae8b99f7bccbd4e5f67c6c884dcc25174dd0e7 = $component; } ?>
<?php $component = App\View\Components\Paginate::resolve(['data' => $rows] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('paginate'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Paginate::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal29ae8b99f7bccbd4e5f67c6c884dcc25174dd0e7)): ?>
<?php $component = $__componentOriginal29ae8b99f7bccbd4e5f67c6c884dcc25174dd0e7; ?>
<?php unset($__componentOriginal29ae8b99f7bccbd4e5f67c6c884dcc25174dd0e7); ?>
<?php endif; ?>
                </div>

            </div>

        </div><!-- row -->
    </section><!-- section -->

<?php $__env->stopSection(); ?>

<?php echo $__env->make('dashboard.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\internal-real-estate\resources\views/dashboard/neighborhoods/index.blade.php ENDPATH**/ ?>