<?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">
        
        <?php if($cobon ?? ''  && $cobon->id): ?>
            <?php echo method_field('PUT'); ?>
        <?php endif; ?>
        <?php echo csrf_field(); ?>
<div class="form-group col-lg-6">
            <label><?php echo e(meta('code', getCurrentLocale()) ?? __('cobons.code')); ?></label>
            <input type="text"  class="form-control  <?php echo e($errors->has('code') ? 'is-invalid' : ''); ?>" name="code" placeholder="<?php echo e(meta('code', getCurrentLocale()) ?? __('cobons.code')); ?>" value='<?php echo e(old("code", $cobon->code ?? "")); ?>'/>
        </div>      
<div class="form-group col-lg-6">
            <label><?php echo e(meta('count', getCurrentLocale()) ?? __('cobons.count')); ?></label>
            <input type="number" min="0" class="form-control  <?php echo e($errors->has('count') ? 'is-invalid' : ''); ?>" name="count" placeholder="<?php echo e(meta('count', getCurrentLocale()) ?? __('cobons.count')); ?>" value='<?php echo e(old("count", $cobon->count ?? "")); ?>'/>
        </div>

        <div class="form-group col-lg-6">
            <label><?php echo e(meta('discount_type', getCurrentLocale()) ?? __('cobons.discount_type')); ?></label>
            <select class="form-control <?php echo e($errors->has('discount_type') ? 'is-invalid' : ''); ?>" name="discount_type">
                <option <?php if($cobon ?? ''  && $cobon->id): ?> <?php if($cobon->discount_type == '1'): ?> selected <?php endif; ?> <?php endif; ?> value="1"><?php echo e(__('cobons.value')); ?></option>
                <option <?php if($cobon ?? ''  && $cobon->id): ?> <?php if($cobon->discount_type == '2'): ?> selected <?php endif; ?> <?php endif; ?>  value="2"><?php echo e(__('cobons.percentage')); ?></option>
            </select>
        </div>
        <div class="form-group col-lg-6">
            <label><?php echo e(meta('discount_amount', getCurrentLocale()) ?? __('cobons.discount_amount')); ?></label>
            <input type="number"  class="form-control  <?php echo e($errors->has('discount_amount') ? 'is-invalid' : ''); ?>" name="discount_amount" placeholder="<?php echo e(meta('discount_amount', getCurrentLocale()) ?? __('cobons.discount_amount')); ?>" value='<?php echo e(old("discount_amount", $cobon->discount_amount ?? "")); ?>'/>
        </div>
        
        <div class="form-group col-lg-6">
            <label><?php echo e(meta('start_date', getCurrentLocale()) ?? __('cobons.start_date')); ?></label>
            <input type="date"  class="form-control  <?php echo e($errors->has('start_date') ? 'is-invalid' : ''); ?>" name="start_date" placeholder="<?php echo e(meta('start_date', getCurrentLocale()) ?? __('cobons.start_date')); ?>" value='<?php echo e(old("start_date", $cobon->start_date ?? "")); ?>'/>
        </div>
        <div class="form-group col-lg-6">
            <label><?php echo e(meta('end_date', getCurrentLocale()) ?? __('cobons.end_date')); ?></label>
            <input type="date"  class="form-control  <?php echo e($errors->has('end_date') ? 'is-invalid' : ''); ?>" name="end_date" placeholder="<?php echo e(meta('end_date', getCurrentLocale()) ?? __('cobons.end_date')); ?>" value='<?php echo e(old("end_date", $cobon->end_date ?? "")); ?>'/>
        </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 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('/')); ?>/",
            url_type = <?php echo json_encode(url(getCurrentLocale().'/admin/type/')); ?>,
            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>
    <script src="<?php echo e(asset('assets/admin/js/cobons.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/raied/resources/views/admin/cobons/form.blade.php ENDPATH**/ ?>