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

<div class="border-item">
    <form class="form-row" method="post" action="<?php echo e($action); ?>" enctype="multipart/form-data">
        <input type="hidden" name="user_id" value="<?php echo e(auth()->id()); ?>">
        <?php if($slider ?? ''  && $slider->id): ?>
            <?php echo method_field('PUT'); ?>
        <?php endif; ?>
        <?php echo csrf_field(); ?>
  <div class="form-group col-lg-6">
            <label><?php echo e(__('sliders.type')); ?> </label>
        <select name="type" onchange="selectadv(this)" class="form-control <?php echo e($errors->has('type') ? 'is-invalid' : ''); ?>"  >
            <option  <?php if($slider ?? ''  && $slider->id): ?> <?php if($slider->type == 'main'): ?> selected <?php endif; ?>  <?php endif; ?> value="main"><?php echo e(__('sliders.main')); ?></option>
            <option  <?php if($slider ?? ''  && $slider->id): ?> <?php if($slider->type == 'adv'): ?> selected  <?php endif; ?>  <?php endif; ?> value="adv"><?php echo e(__('sliders.adv')); ?></option>
        </select>
             </div>
             <div class="form-group col-lg-6">
            <label><?php echo e(__('sliders.link')); ?> </label>
            <input type="text" step=".01" class="form-control <?php echo e($errors->has('link') ? 'is-invalid' : ''); ?>" name="link" placeholder="<?php echo e(__('sliders.link')); ?>" value='<?php echo e(old("link", $slider->link ?? "")); ?>'/>
        </div>

       

        <?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) ?? __('sliders.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) ?? __('sliders.title')); ?>" value='<?php echo e(old("title_{$language->local}", $slider[$language->local]->title ?? "")); ?>'/>
        </div>
 <div class="form-group col-lg-6">
            <label><?php echo e(meta('name', $language->local) ?? __('sliders.name')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
            <input type="text" class="form-control <?php echo e($errors->has('name_'.$language->local) ? 'is-invalid' : ''); ?>" name="name_<?php echo e($language->local); ?>" placeholder="<?php echo e(meta('name', $language->local) ?? __('sliders.name')); ?>" value='<?php echo e(old("name_{$language->local}", $slider[$language->local]->name ?? "")); ?>'/>
        </div>
        <div class="form-group col-lg-12">
            <label><?php echo e(meta('description', $language->local) ?? __('sliders.description')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
            <textarea name="description_<?php echo e($language->local); ?>" class="form-control <?php echo e($errors->has('description_'.$language->local) ? 'is-invalid' : ''); ?>" placeholder="<?php echo e(meta('description', $language->local) ?? __('sliders.description')); ?>"><?php echo e(old("description_{$language->local}", $slider[$language->local]->description ?? "")); ?></textarea>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<div id="advantages" <?php if($slider ?? ''  && $slider->id): ?>  <?php if($slider->type == 'main' ): ?> style="display:none" <?php endif; ?>  <?php else: ?> style="display:none" <?php endif; ?>  class="form-group col-lg-12">
    <div class="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('adv_one', $language->local) ?? __('sliders.adv_one')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
            <input type="text" class="form-control <?php echo e($errors->has('adv_one_'.$language->local) ? 'is-invalid' : ''); ?>" name="adv_one_<?php echo e($language->local); ?>" placeholder="<?php echo e(meta('adv_one', $language->local) ?? __('sliders.adv_one')); ?>" value='<?php echo e(old("adv_one_{$language->local}", $slider[$language->local]->adv_one ?? "")); ?>'/>
        </div>
        <div class="form-group col-lg-6">
            <label><?php echo e(meta('adv_two', $language->local) ?? __('sliders.adv_two')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
            <input type="text" class="form-control <?php echo e($errors->has('adv_two_'.$language->local) ? 'is-invalid' : ''); ?>" name="adv_two_<?php echo e($language->local); ?>" placeholder="<?php echo e(meta('adv_two', $language->local) ?? __('sliders.adv_two')); ?>" value='<?php echo e(old("adv_two_{$language->local}", $slider[$language->local]->adv_two ?? "")); ?>'/>
        </div>
        <div class="form-group col-lg-6">
            <label><?php echo e(meta('adv_three', $language->local) ?? __('sliders.adv_three')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
            <input type="text" class="form-control <?php echo e($errors->has('adv_three_'.$language->local) ? 'is-invalid' : ''); ?>" name="adv_three_<?php echo e($language->local); ?>" placeholder="<?php echo e(meta('adv_three', $language->local) ?? __('sliders.adv_three')); ?>" value='<?php echo e(old("adv_three_{$language->local}", $slider[$language->local]->adv_three ?? "")); ?>'/>
        </div>
        <div class="form-group col-lg-6">
            <label><?php echo e(meta('adv_four', $language->local) ?? __('sliders.adv_four')); ?> <?php echo e(count($languages) > 1 ? "({$language->name})" : ''); ?> </label>
            <input type="text" class="form-control <?php echo e($errors->has('adv_four_'.$language->local) ? 'is-invalid' : ''); ?>" name="adv_four_<?php echo e($language->local); ?>" placeholder="<?php echo e(meta('adv_four', $language->local) ?? __('sliders.adv_four')); ?>" value='<?php echo e(old("adv_four_{$language->local}", $slider[$language->local]->adv_four ?? "")); ?>'/>
        </div>
       

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

            <div class="photos main_photo <?php echo e(old('image', $slider->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', $slider->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', $slider->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> Choose
                </a>
             </span>
        </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'); ?>
<script>
    function selectadv(elem)
    {
        let data = $(elem).val();
        if(data == 'main'){
            $('#advantages').css('display','none');
        }
        else{
            $('#advantages').css('display','block');
        }
    }
</script>
    <!-- Editor JS files -->

        <script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
    <script>
        let route_prefix = "<?php echo e(url(config('lfm.prefix'))); ?>",
            url = "<?php echo e(url('/')); ?>/",
            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', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/omaralyomhost/public_html/electron/resources/views/admin/sliders/form.blade.php ENDPATH**/ ?>