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

            <div class="form-group col-lg-6">
                <label><?php echo e(meta('status_user', getCurrentLocale()) ?? __('cobons.status_user')); ?></label>
                <select class="form-control <?php echo e($errors->has('status_user') ? 'is-invalid' : ''); ?>" name="status_user">
                    <option <?php echo e((isset($cobon) ? $cobon->status_user : '')  == 'all' ? 'selected' : ''); ?>  value="all"><?php echo e(__('cobons.all')); ?></option>
                    <option <?php echo e((isset($cobon) ? $cobon->status_user : '')  == 'users' ? 'selected' : ''); ?>  value="users"><?php echo e(__('cobons.users')); ?></option>
                    <option <?php echo e((isset($cobon) ? $cobon->status_user : '')  == 'visitors' ? 'selected' : ''); ?> value="visitors"><?php echo e(__('cobons.visitor')); ?></option>
                    <option <?php echo e((isset($cobon) ? $cobon->status_user : '')  == 'companies' ? 'selected' : ''); ?>   value="companies"><?php echo e(__('cobons.companies')); ?></option>
                </select>
            </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 echo e((isset($cobon) ? $cobon->discount_type : '')  == 'value' ? 'selected' : ''); ?> value="value"><?php echo e(__('cobons.value')); ?></option>
                    <option <?php echo e((isset($cobon) ? $cobon->discount_type : '')  == 'percentage' ? 'selected' : ''); ?>  value="percentage"><?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 -->
    
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <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 /Applications/MAMP/htdocs/albenna/resources/views/admin/cobons/form.blade.php ENDPATH**/ ?>