<?php if (isset($component)) { $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AdminPanelLayout::class, []); ?>
<?php $component->withName('admin-panel-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title'); ?>
        مشخصات خدمت
     <?php $__env->endSlot(); ?>
     <?php $__env->slot('main'); ?>
        <!-- Checked checkbox -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h4 class="m-0 text-dark">مشخصات خدمت : <?php echo e($service->name); ?></h4>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-left">

                            <li class="breadcrumb-item">مدیریت خدمات</li>
                            <li class="breadcrumb-item active">مشخصات خدمت</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <section class="content mt-sm-3 d-flex flex-column justify-content-around">
            <div class="card p-0 card-primary col-md-7 mx-auto mb-4">
                <div class="card-header">
                    <h5 class="card-title small">مشخصات خدمت</h5>
                </div>
                <!-- /.card-header -->
                <!-- form start -->
                <form class="mt-3 p-2">
                    <div class="form-group">
                        <label class="text-muted" for="service">نام خدمت</label>
                        <input type="text" name='name' class="form-control" id="service"
                               value="<?php echo e($service->name); ?>"/>
                    </div>
                    <div class="form-group">
                        <label class="text-muted" for="status">وضعیت</label>
                        <input type="text" name='name' class="form-control" id="status"
                               value="<?php echo e($service->statusInFa); ?>"/>
                    </div>
                    <div class="form-group">
                        <label class="text-muted" for="parent">دسته پدر</label>
                        <input type="text" name='name' class="form-control" id="parent"
                               value="<?php echo e($service->parent->name); ?>"/>
                    </div>
                    <div class="form-group">
                        <label class="text-muted" for="slug">URL</label>
                        <input type="text" name='name' class="form-control" id="slug"
                               value="<?php echo e($service->slug); ?>"/>
                    </div>
                    <div class="form-group">
                        <label class="text-muted" for="title">عنوان</label>
                        <input type="text" name='name' class="form-control" id="title"
                               value="<?php echo e($service->title); ?>"/>
                    </div>
                    <div class="form-group">
                        <label class="text-muted" for="priority">اولویت</label>
                        <input type="text" name='name' class="form-control" id="priority"
                               value="<?php echo e($service->priority ?? 'وارد نشده'); ?>"/>
                    </div>
                    <div class="form-group">
                        <label class="text-muted" for="days_provide">مهلت سفارش</label>
                        <input type="text" name='name' class="form-control" id="days_provide"
                               value="<?php echo e($service->days_provide ?? 'وارد نشده'); ?>"/>
                    </div>
                    <div class="form-group mx-auto my-2 d-flex justify-content-center">
                        <?php if($service->media_id): ?>
                            <img src="<?php echo e($service->thumb()); ?>" class="mx-auto" style="width: 6rem;height: 6rem">
                        <?php else: ?>
                            بدون تصویر
                        <?php endif; ?>
                    </div>
                </form>
            </div>

            <?php if($service->description != null): ?>
                <h5 class="my-2 mr-sm pr-3 py-4-2">توضیحاته مربوطه</h5>
                <div class="d-md-flex flex-wrap justify-content-around">
                    <?php $__currentLoopData = $service->description; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="card col-md-5 mx-1" style="height: max-content" id="<?php echo e($key); ?>">
                            <div class="card-body">
                                <h5 class="card-title mb-2 text-muted"><?php echo e($item['title']); ?></h5>
                                <p class="card-text">
                                    <?php echo e($item['desc']); ?>

                                </p>
                                <button class="btn btn-outline-danger btn-block"
                                        onclick="deleteJsonField(event,'<?php echo e(route('service.description_delete',[$service->id,$key])); ?>',<?php echo e($key); ?>)">
                                    حذف این توضیح
                                </button>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            <?php endif; ?>

            <?php if($service->questions()->exists()): ?>
                <h5 class="my-2 mr-sm pr-3 py-4-2">سوالات مربوطه</h5>
                <div class="d-md-flex flex-wrap justify-content-around mb-2">
                    <?php $__currentLoopData = $service->questions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <ul class="list-group mb-2" id="<?php echo e($item->id); ?>">
                            <li class="list-group-item active"><?php echo e($item->content); ?></li>
                            <?php $__currentLoopData = $item->children; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $child): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li class="list-group-item">
                                    <?php if($item->type == 'checkbox'): ?>
                                        <div class="form-check">
                                            <input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
                                            <label class="form-check-label" for="defaultCheck1">
                                                <?php echo e($child->content); ?>

                                                <?php echo e($child->price == 0 ? '' : '-'.$child->price.' تومان '); ?>

                                            </label>
                                        </div>
                                    <?php else: ?>
                                        <div class="form-check">
                                            <input class="form-check-input" type="radio" name="exampleRadios"
                                                   id="exampleRadios1" value="option1" checked>
                                            <label class="form-check-label" for="exampleRadios1">
                                                <?php echo e($child->content); ?>

                                                <?php echo e($child->price == 0 ? '' : '-'.$child->price.' تومان '); ?>

                                            </label>
                                        </div>
                                    <?php endif; ?>
                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <li class="list-group-item">
                                <span class="btn btn-outline-danger btn-block"
                                      onclick="deleteQuestionField(event,'<?php echo e(route('service.question_delete',[$service->id,$item->id])); ?>',<?php echo e($item->id); ?>)">
                                    حذف این سوال
                                </span>
                            </li>
                        </ul>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            <?php endif; ?>

            <?php if($service->regions()->exists()): ?>
                <h5 class="my-2 mr-sm pr-3 py-4-2">مناطق مربوطه</h5>
                <div class="card col-sm-11 mx-auto ">
                    <div class="card-body d-flex flex-wrap">
                        <?php $__currentLoopData = $service->regions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $region): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <p class="card-text ml-3">
                                <?php echo e($region->name); ?>

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

            <?php if($service->service_meta()->exists()): ?>
                <h5 class="my-2 mr-sm pr-3 py-4-2">فاکتور مربوطه</h5>
                    <div class="tableSection bg-light smSmall col-12 p-0 pr-sm-4 pl-sm-4 pt-sm-4 pb-0 table-responsive">
                        <table class="table table-striped text-center col-12">
                            <thead>
                            <tr>
                                <th scope="col">عنوان</th>
                                <th scope="col">واحد</th>
                                <th scope="col">قیمت</th>
                                <th scope="col">تخفیف خالص</th>
                                <th scope="col">تخفیف درصدی</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $service->service_meta; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $price): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr id="tr">
                                    <th scope="row"><?php echo e($price['value']['name']); ?></th>
                                    <td><?php echo e($price['value']['unit']); ?></td>
                                    <td><?php echo e($price['value']['price']); ?></td>
                                    <td><?php echo e($price['value']['discount_pure']); ?></td>
                                    <td><?php echo e($price['value']['discount_percent']); ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
            <?php endif; ?>
        </section>
     <?php $__env->endSlot(); ?>
    <?php if(session()->get('status') == 'created'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'success',
                    text: 'ایجاد توضیحات با موفقیت انجام شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
    <?php if(session()->get('status') == 'deleted'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'success',
                    text: 'حذف توضیحات با موفقیت انجام شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
    <script>
        // CKEDITOR.replace( 'description' );
    </script>
 <?php if (isset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5)): ?>
<?php $component = $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5; ?>
<?php unset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php /**PATH /home/foroshg1/laravel/Modules/Mehrab/Service/Providers/../Resources/Views//Admin/show_service.blade.php ENDPATH**/ ?>
