<?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' => '<i class=\'fa-solid fa-plus\'></i> اضافة خدمة جديد',
            'class' => 'btn-success',
            'link' => adminUrl('services/create'),
        ],
    ]] + (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="services">
        <div class="row">

            <?php if(count($services) != 0): ?>
                <div class="col-12">
                    <div class="box table-responsive p-4">
                        <table width="100%" id="myTable" class="table table-inverse mb-0 border-0">
                            <thead class="thead-inverse">
                                <tr>
                                    <th>التحكم</th>
                                    <th class=" text-center">الصورة</th>
                                    <th>اسم الخدمة </th>
                                    <th>داخل قسم</th>
                                    <th>توقيت الإضافة</th>
                                    <th>اضيف بواسطة</th>
                                </tr>
                            </thead>
                            <tbody>

                                <?php $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr class="parents">

                                        <td style="width: 50px">



                                            <a href="<?php echo e(adminUrl('services/edit/' . $row->id . '?section=main-info')); ?>"
                                                class=" btn btn-sm btn-soft-primary">
                                                <i class="fa fa-edit"></i>
                                            </a>

                                            <span class=" text-muted mx-1">-</span>

                                            <a href="<?php echo e(adminUrl('services/edit/' . $row->id . '?section=sub-services')); ?>"
                                                class=" btn btn-sm btn-soft-success">
                                                <!-- services/details/create?ref=' . $row->id -->
                                                <i class="fa fa-plus"></i>
                                            </a>

                                            <span class=" text-muted mx-1">-</span>


                                            <form class="ajax-delete d-inline-block"
                                                action="<?php echo e(route('services-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->title); ?>"
                                                    class="btn btn-sm btn-soft-danger"><i
                                                        class="fa-solid fa-trash"></i></button>
                                            </form>

                                        </td><!-- actions -->

                                        <td class=" text-center">
                                            <img width="100px" height="50px" class=" radius object-content"
                                                src="<?php echo e(largeAsset('services/' . $row->image)); ?>" alt="">
                                        </td>


                                        <td><?php echo e(Str::limit($row->title, 75, '...')); ?></td>
                                        <td>
                                            <?php if($row->type == 'service'): ?>
                                                الخدمات
                                            <?php else: ?>
                                                لماذا تختارنا
                                            <?php endif; ?>
                                        </td>


                                        <td><?php echo e(parseTime($row->created_at)); ?></td>

                                        <td>
                                            <?php if($row->creator != null): ?>
                                                <?php echo e($row->creator->full_name); ?>

                                            <?php else: ?>
                                                <small>لا يوجد</small>
                                            <?php endif; ?>
                                        </td>


                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            </tbody>
                        </table>
                    </div><!-- box -->


                    <div class=" dir-rtl">
                        <?php echo $services->onEachSide(5)->links(); ?>


                    </div>

                </div><!-- col Table Data -->
            <?php else: ?>
                <div class="col-12">
                    <div class="box py-5 text-center">
                        <img class="w128" src="<?php echo e(asset('dashboard/images/empty-folder.png')); ?>" alt="">
                        <h4 class=" text-center my-3">لا يوجد خدمات داخل النظام حتى الان.</h4>
                        <a href="<?php echo e(adminUrl('services/create')); ?>" class="btn btn-success px-3">اضف الان !</a>
                    </div>
                </div>
            <?php endif; ?>

        </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\wjhatna\resources\views/dashboard/services/index.blade.php ENDPATH**/ ?>