<?php $__env->startSection('content'); ?>
    <div class="side-title">
        <h3><?php echo e($head ?? ''); ?></h3>
    </div>



    <div class="border-item">
      <!---  <ul class="nav nav-pills bg-nav-pills nav-justified mb-3">
            <li class="nav-item">
                <a href="#main" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0 active">
                    <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                    <span class="d-none d-lg-block"><?php echo e(__('services.details')); ?></span>
                </a>
            </li>
            <li class="nav-item">
                <a href="#section_features" data-toggle="tab" aria-expanded="false" class="nav-link rounded-0">
                    <i class="mdi mdi-home-variant d-lg-none d-block mr-1"></i>
                    <span class="d-none d-lg-block"><?php echo e(__('services.features')); ?></span>
                </a>
            </li>

        </ul>--->
        <form class="form-row" method="post" onsubmit="saveForm(this)" action="<?php echo e($action); ?>" enctype="multipart/form-data">
            <?php if($service ?? ''  && $service->id): ?>
                <?php echo method_field('PUT'); ?>
            <?php endif; ?>
            <?php echo csrf_field(); ?>
            <div class="tab-content row col-12">
                <div class="tab-pane col-lg-12 active" id="main">
                    <div class="form-row">


                        <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                            <div class="form-group col-lg-6">
                                <label><?php echo e(meta('title', $language->local) ?? __('services.title')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
                                <input type="text" class="form-control <?php echo e($errors->has('title_'.$language->local) ? 'is-invalid' : ''); ?>" name="title_<?php echo e($language->local); ?>" placeholder="<?php echo e(meta('title', $language->local) ?? __('services.title')); ?>" value='<?php echo e(old("title_{$language->local}", $service[$language->local]->title ?? "")); ?>'/>
                            </div>
                            <div class="form-group col-lg-12">
                                <label><?php echo e(meta('description', $language->local) ?? __('services.description')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
                                <textarea  class="form-control <?php echo e($errors->has('description_'.$language->local) ? 'is-invalid' : ''); ?>" name="description_<?php echo e($language->local); ?>" placeholder="<?php echo e(meta('description', $language->local) ?? __('services.description')); ?>"><?php echo e(old("description_{$language->local}", $service[$language->local]->description ?? "")); ?></textarea>
                            </div>

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

                        <div class="form-group col-lg-12 image_container" >
                            <label><?php echo e(meta('image', getCurrentLocale()) ?? __('services.image')); ?> </label>
                            <input id="image_thumbnail" class="image_thumbnail" type="hidden" name="image" value="<?php echo e(old("image", $service->image ?? "")); ?>"/>

                            <div class="photos main_photo <?php echo e(old('image', $service->image ?? '') ? ' wow fadeInUp' : 'hide'); ?>">
                                <div class="col-md-4">
                                    <div class="items">
                                        <div class="img">
                                            <a href="#" id="lfm" data-input=".image_thumbnail" data-preview=".image_holder" class="lfm" data-hide=".pick_button">
                                                <img src="<?php echo e(asset(old('image', $service->image ?? ''))); ?> "  id="image_holder" class="image_holder"/>
                                            </a>
                                        </div>
                                        <a href="#" class="showHide resetImage close" data-empty=".image_thumbnail" data-hide=".main_photo" data-show=".pick_button"><i class="fas fa-times"></i></a>
                                    </div>
                                </div>
                            </div>

                            <div class="clearfix"></div>
                            <span class="input-group-btn pick_button <?php echo e(old('image', $service->image ?? '') ? 'hide' : ''); ?> ">
                                <a id="lfm"  data-input=".image_thumbnail" data-preview=".image_holder" data-show=".main_photo" data-hide=".pick_button" class="lfm btn btn-primary text-light">
                                    <i class="fas fa-camera-retro"></i> <?php echo e(__('dashboard.choose')); ?>

                                </a>
                             </span>
                            </div>
                    </div>

                </div>
<!---
                <div class="tab-pane col-lg-12" id="section_features">
                    <div class="row">

                        <div class="col-lg-12" id="features">
                            <?php $__currentLoopData = $features; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php echo $__env->make('admin.features.form',['feature'=>$row,'key'=>$key], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div class="col-lg-12">
                            <a style="cursor: pointer;"  data-id="<?php echo e(count($features)); ?>" onclick="addFeature(this)" class="btn_1 gray "><i class="fa fa-fw fa-plus-circle"></i><?php echo e(__("services.add_new")); ?></a>
                        </div>

                    </div>
                </div>
--->
            </div>


            <div class="text-center mt-5 col-12">
                <button class="butn" ><span><?php echo e(__('dashboard.save')); ?></span></button>
            </div>
        </form>
    </div>


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





<?php $__env->startSection('inner_js'); ?>
    <!-- Editor JS orders -->
    <script src="<?php echo e(asset('/assets/admin/js/lib/tinymce.min.js')); ?>"></script>

    <script>

        function addFeature(elem)
        {
            var num = $(elem).attr('data-id');
            var newrow = parseInt(num)+1;
            $(elem).attr('data-id', newrow);

            $.ajax({
                url : url_feature,
                type : 'GET',
                data : 'key='+num,
                success:function(data)
                {
                    $('#features').append(data);
                }
            })
        }

        function remove(elem)
        {
            $(elem).closest('.row').remove();
        }

    </script>

    <script>
        let route_prefix = "<?php echo e(url(config('lfm.prefix'))); ?>",
            url = "<?php echo e(url('/')); ?>/",
            url_feature = "<?php echo e(route('fetch.features')); ?>",
            currentLanguage = "<?php echo e(getCurrentLocale()); ?>",
            imagePath = "<?php echo e(asset('')); ?>";
    </script>
    <script src="<?php echo e(asset('assets/admin/js/editor.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/admin/js/lfm.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/admin/js/articles.js')); ?>"></script>
<?php $__env->stopSection(); ?>




<?php echo $__env->make('admin.layouts.container', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/mostafagalal/Desktop/Sites/madar/resources/views/admin/services/form.blade.php ENDPATH**/ ?>