<?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">
                        <h1 class="m-0 text-dark">ویرایش خدمت : <?php echo e($service->name); ?></h1>
                    </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">
            <?php if($service->parent()->exists()): ?>
                <div class="card p-0 card-primary col-md-7 mx-auto mb-4">
                    <div class="card-header">
                        <h3 class="card-title small">ویرایش خدمت</h3>
                    </div>
                    <!-- /.card-header -->
                    <!-- form start -->
                    <form class="mt-3 p-2" action="<?php echo e(route('service.update',$service->id)); ?>" method="post"
                          enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <?php echo method_field('PATCH'); ?>
                        <div class="form-group">
                            <select class="form-control" id="parent_id" required name="parent_id">
                                </option>
                                <?php $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $serviceParent): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option
                                        value="<?php echo e($serviceParent->id); ?>" <?php if($serviceParent->id == $service->parent->id): ?> selected="selected" <?php endif; ?> ><?php echo e($serviceParent->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <?php $__errorArgs = ['parent_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <input type="text" name='name' class="form-control" id="service"
                                   placeholder="نام خدمت" value="<?php echo e(old('name',$service->name)); ?>" required>
                            <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <input type="text" name='slug' class="form-control" id="slug"
                                   placeholder="URL" value="<?php echo e(old('slug',$service->slug)); ?>" required>
                            <?php $__errorArgs = ['slug'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <input type="text" name='title' class="form-control" id="title"
                                   placeholder="عنوان(اختیاری)" value="<?php echo e(old('title',$service->title)); ?>">
                            <?php $__errorArgs = ['title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <input type="number" name='priority' class="form-control" id="priority"
                                   placeholder="الویت نمایش بصورت عدد وارد شود(اختیاری)" value="<?php echo e(old('priority',$service->priority)); ?>">
                            <?php $__errorArgs = ['priority'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <input type="number" name='days_provide' class="form-control" id="days_provide"
                                   placeholder="از الان تا چند روز بعد قابل سفارش است پیشفرض ۱۰ روز و حداکثر ۳۰ روز"
                                   value="<?php echo e(old('days_provide',$service->days_provide)); ?>">
                            <?php $__errorArgs = ['days_provide'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group mx-auto my-2 d-flex justify-content-center">
                            <?php if($service->banner): ?>
                                <img src="<?php echo e($service->banner->thump()); ?>" class="mx-auto" style="width: 6rem;height: 6rem">
                            <?php else: ?>
                                بدون تصویر
                            <?php endif; ?>
                        </div>
                        <?php if($service->banner): ?>
                            <div class="form-group form-check mx-auto d-flex">
                                <input type="checkbox" name="delPic" class="form-check-input" id="delPic">
                                <label class="form-check-label" for="delPic">حذف تصویر</label>
                            </div>
                        <?php endif; ?>
                        <div class="custom-file mb-sm-2 mb-5 withImgProf mx-auto position-relative">
                            <input type="file" name="img"
                                   class="custom-file-input <?php $__errorArgs = ['img'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                   id="customFile" accept="image/*" value="<?php echo e(old('img')); ?>">
                            <?php $__errorArgs = ['img'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid-tooltip" style="top: 38px ;left: unset;">
                                <p style="font-size: 0.7rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            <label class="custom-file-label paddingRight text-muted smallxsm" for="customFile">انتخاب
                                عکس
                                (اختیاری)</label>
                            <small class="text-muted mr-sm-1">حجم حداکثر 1mb فرمت jpeg یا jpg</small>
                        </div>
                        <button type="submit" class="btn btn-primary btn-block mt-3">ثبت</button>
                    </form>

                </div>
            <?php else: ?>
                <div class="card p-0 card-primary col-md-5 mx-auto" style="height: min-content !important;">
                    <div class="card-header">
                        <h3 class="card-title small">ویرایش خدمت سردسته</h3>
                    </div>

                    <form class="mt-3 p-2" action="<?php echo e(route('service.update_parent',$service->id)); ?>" method="post"
                          enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <div class="form-group">
                            <input type="text" name='name_parent' class="form-control" id="service_parent"
                                   placeholder="نام خدمت" value="<?php echo e(old('name_parent',$service->name)); ?>" required>
                            <?php $__errorArgs = ['name_parent'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <input type="text" name='slug_parent' class="form-control" id="slug_parent"
                                   placeholder="URL" value="<?php echo e(old('slug_parent',$service->slug)); ?>" required>
                            <?php $__errorArgs = ['slug_parent'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <input type="text" name='title_parent' class="form-control" id="title_parent"
                                   placeholder="عنوان" value="<?php echo e(old('title_parent',$service->title)); ?>">
                            <?php $__errorArgs = ['title_parent'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group">
                            <input type="number" name='priority_parent' class="form-control" id="priority_parent"
                                   placeholder="الویت نمایش بصورت عدد وارد شود"
                                   value="<?php echo e(old('priority_parent',$service->priority)); ?>">
                            <?php $__errorArgs = ['priority_parent'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>
                        <div class="form-group mx-auto my-2 d-flex justify-content-center">
                            <?php if($service->banner): ?>
                            <img src="<?php echo e($service->banner->thump()); ?>" class="mx-auto" style="width: 6rem;height: 6rem">
                            <?php else: ?>
                                بدون تصویر
                            <?php endif; ?>
                        </div>
                        <?php if($service->banner): ?>
                        <div class="form-group form-check mx-auto d-flex">
                            <input type="checkbox" name="delPic" class="form-check-input" id="delPic">
                            <label class="form-check-label" for="delPic">حذف تصویر</label>
                        </div>
                        <?php endif; ?>
                        <div class="custom-file mb-sm-2 mb-5 withImgProf mx-auto">
                            <input type="file" name="img_parent"
                                   class="custom-file-input <?php $__errorArgs = ['img_parent'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                   id="customFile" accept="image/*" value="<?php echo e(old('img_parent')); ?>">
                            <?php $__errorArgs = ['img_parent'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <div class="invalid">
                                <p class="text-danger" style="font-size: 0.8rem;padding-right: 0.2rem"><?php echo e($message); ?></p>
                            </div>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            <label class="custom-file-label paddingRight text-muted smallxsm" for="customFile">انتخاب
                                عکس جدید
                                (اختیاری)</label>

                        </div>
                        <button type="submit" class="btn btn-primary btn-block mt-3">ثبت</button>
                    </form>
                    <?php endif; ?>

                </div>
        </section>
     <?php $__env->endSlot(); ?>
 <?php if (isset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5)): ?>
<?php $component = $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5; ?>
<?php unset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php /**PATH C:\wamp64\www\newer\Modules\Mehrab\Service\Providers/../Resources/Views//Admin/edit_service.blade.php ENDPATH**/ ?>
