

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-lg-9 col-12 mx-auto">
        <?php if($errors->get('msgError')): ?>
          <div class="m-3  alert alert-warning alert-dismissible fade show" role="alert">
            <span class="alert-text text-white">
              <?php echo e($errors->first()); ?></span>
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
              <i class="fa fa-close" aria-hidden="true"></i>
            </button>
          </div>
          <?php endif; ?>
          <?php if(session('success')): ?>
          <div class="m-3  alert alert-success alert-dismissible fade show" id="alert-success" role="alert">
            <span class="alert-text text-white">
              <?php echo e(session('success')); ?></span>
            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
              <i class="fa fa-close" aria-hidden="true"></i>
            </button>
          </div>
          <?php endif; ?>
        
        
        <div class="card card-body mt-4">
            <h6 class="mb-0">Update Contest</h6>
            <p class="text-sm mb-0">Fill Data</p>

            <form action="/contest/update" method="POST"  enctype="multipart/form-data">
            <?php echo csrf_field(); ?>
            <input name="id" type="hidden" value="<?php echo e($data->id); ?>">
            <input name="oldicon" type="hidden" value="<?php echo e($data->image); ?>">
            
            <div class="form-group">
                <label for="recipient-name" class="form-label">Select Contest Type</label>
                <select name="type" class="form-control" required>
                    <option value="refer" <?php echo e(($data->type == 'refer') ? 'selected' : ''); ?></option>Refer Task ( User need to invite x user and get bonus )</option>
                    <option value="level" <?php echo e(($data->type == 'level') ? 'selected' : ''); ?>>Reach Level ( User need to compelte x level and to get bonus )</option>
                </select>
            </div>
            
            <div class="row">
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title English</label>
                        <input type="text" class="form-control" name="title_en" value="<?php echo e($data->title_en); ?>" placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
                
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title Arabic</label>
                        <input type="text" class="form-control" name="title_ar" value="<?php echo e($data->title_ar); ?>" placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
                
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title Indonesian</label>
                        <input type="text" class="form-control" name="title_in" value="<?php echo e($data->title_in); ?>"  placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
                
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title French</label>
                        <input type="text" class="form-control" name="title_fr" value="<?php echo e($data->title_fr); ?>" placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
                
            </div>
            
            <div class="row">
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title German</label>
                        <input type="text" class="form-control" name="title_de" value="<?php echo e($data->title_de); ?>" placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
                
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title Spanish</label>
                        <input type="text" class="form-control" name="title_es" value="<?php echo e($data->title_es); ?>" placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
                
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title Vietnamese</label>
                        <input type="text" class="form-control" name="title_vi"  value="<?php echo e($data->title_vi); ?>" placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
                
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title Italian</label>
                        <input type="text" class="form-control" name="title_it"  value="<?php echo e($data->title_it); ?>" placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
                
            </div>
            
            <div class="row">
                <div class="col-3">
                    <div class="form-group">
                        <label for="recipient-name" class="form-label">Title Bangla</label>
                        <input type="text" class="form-control" name="title_bn" value="<?php echo e($data->title_bn); ?>" placeholder="Invite 5 Friend /Reach at level 5" required>
                    </div>
                </div>
               
                
            </div>

            <div class="form-group">
                <label for="recipient-name" class="form-label">Icon </label>
                <input type="file" class="form-control" name="icon" >
            </div>

            <div class="form-group">
                <label for="recipient-name" class="form-label">Refer Required</label>
                <input type="number" class="form-control" name="task_require"  value="<?php echo e($data->task_require); ?>" placeholder="5" required>
            </div>

            <div id="date" class="row">
                <div class="form-group col-6">
                    <label for="recipient-name" class="form-label">Start From</label>
                    <input type="date" class="form-control" name="start_from" id="start_from"  value="<?php echo e($data->start_from); ?>"  placeholder="Pick Start Date">
                </div>
                
                 <div class="form-group col-6">
                    <label for="recipient-name" class="form-label">Valid Till</label>
                    <input type="date" class="form-control" name="expired_at" id="expired_at"   value="<?php echo e($data->expired_at); ?>"  placeholder="Pick End Date">
                </div>
            </div>

            <div class="form-group">
                <label for="recipient-name" class="form-label">After Complete Contest user get Coin</label>
                <input type="number" class="form-control" name="coin" placeholder="10"  value="<?php echo e($data->coin); ?>"  required>
            </div>
                    
            <div class="d-flex justify-content-end mt-4">
                <a href="<?php echo e(url('/contest')); ?>" type="button" name="button" class="btn btn-light m-0">BACK TO LIST</a>
                <button type="submit" name="button" class="btn bg-gradient-info m-0 ms-2">Update Contest</button>
            </div>
            </form>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('js'); ?>
<script src="<?php echo e(URL::asset('assets/js/plugins/choices.min.js')); ?>"></script>
<script src="//cdn.ckeditor.com/4.14.1/standard/ckeditor.js"></script>
<script>
     $(document).ready(function () {
        $("#alert-success").delay(3000).slideUp(300);

    });

    if (document.getElementById('choices-tag')) {
        var tag = document.getElementById('choices-tag');
        const example = new Choices(tag);
    }

    
    
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('user_type.auth', ['parentFolder' => '', 'childFolder' => ''], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/in2apps/public_html/lebara.in2apps.xyz/resources/views/contest/edit.blade.php ENDPATH**/ ?>