
<?php $__env->startSection('title', 'وسائل الراحة'); ?>
<?php $__env->startSection('content'); ?>

    <?php if (isset($component)) { $__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa = $component; } ?>
<?php $component = App\View\Components\Dashboard\LinksBar::resolve(['links' => [
        [
            'name' => 'وسائل الراحة',
        ],
    ]] + (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('property_amenities_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 -->

                        <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; ?>

                <?php if(isset($editRow['id'])): ?>
                    <a href="<?php echo e(url()->current()); ?>" class="mb-4 text-danger">إلغاء التعديل</a>
                <?php endif; ?>
            </div>
            <?php endif; ?>

            <div class="<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('property_amenities_create')): ?><?php echo e('col-lg-9 col-md-8'); ?> <?php else: ?> <?php echo e('col-12'); ?> <?php endif; ?>">
                <div class="box px-0 pt-2 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(['property_amenities_edit','property_amenities_delete'])): ?>
                                    <th>التحكم</th>
                                <?php endif; ?>
                                <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(['property_amenities_edit','property_amenities_delete'])): ?>
                                        <td>
                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('property_amenities_edit')): ?>
                                                <a class="btn btn-sm btn-soft-primary" href="?edit=<?php echo e($row->id); ?>">
                                                    <i class="fa fa-edit"></i>
                                                </a>
                                            <?php endif; ?>

                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('property_amenities_delete')): ?>
                                                <span class="text-secondary">|</span>
                                                <form class="ajax-delete d-inline-block" action="<?php echo e($destroyRoute); ?>" 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(parseTime($row->created_at)); ?></td>
                                    <td><?php echo $row->admin != null ? $row->admin->full_name : "<small class='text-muted'>لا يوجد</small>"; ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </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/system-data/amenities.blade.php ENDPATH**/ ?>