
<?php $__env->startSection('content'); ?>

    <div class="row">
        <div class="col-sm-12 grid-margin stretch-card">
          <div class="card">
            <div class="card-body">
              <h4 class="card-title"><?php echo e($title); ?></h4>
              <p class="card-description"> <?php echo e($subtitle); ?> </p>
              <form class="forms-sample" method="POST" action="<?php echo e(url('admin/draw/store')); ?>" enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <div class="form-group">
                    <label for="type">type</label>
                    <select class="form-control" name="type" id="type" required>
                      <option value="presentase">presentase</option>
                      <option value="select prize">select prize</option>
                    </select>
                  </div>
                  
                <div class="form-group">
                    <label for="prize_id">Prize</label>
                    <select class="form-control" name="prize_id" id="prize_id" required>
                     <option value="" selected>pilih hadiah</option>
                      <?php $__currentLoopData = $prize; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $priz): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($priz->id); ?>"><?php echo e($priz->label); ?></option>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>
                  <div class="form-group">
                    <label for="voucher_id">Voucher / Code</label>
                    <select class="form-control" name="voucher_id" id="voucher_id" required>
                      <option value="" selected>pilih kupon</option>
                      <?php $__currentLoopData = $voucher; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $voc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($voc->id); ?>"><?php echo e($voc->voucher); ?> - <?php echo e($voc->member); ?></option>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>
                <div class="form-group">
                    <label for="expired date">expired date <small>(optional default today)</small></label>
                    <input type="date" class="form-control" id="expired_date" value="<?php echo e(date('Y-m-d')); ?>" name="expired_date" placeholder="expired_date">
                  </div>
                <hr>
                <div class="row mt-20">
                  <div class="col-sm-12">
                      <a class="btn btn-success" href="<?php echo e(url('admin/draw')); ?>">Back</a>
                    <button type="submit" class="btn btn-primary">Submit</button>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
    </div>

    <?php $__env->startPush('js'); ?>

    <script>
      $(document).ready(function(){
        $("#prize_id").prop("disabled", true);
        $('body').on("change","#type",function(){
          var id = $(this).val();

          if(id == 'presentase'){
            $("#prize_id").prop("disabled", true);
          }else{
            $("#prize_id").prop("disabled", false);
          }
        });
      });
        
      </script>
    <?php $__env->stopPush(); ?>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('template.content', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\SPIN\SPIN-WHEEL-LARAVEL9\resources\views/admin/management/draw/create.blade.php ENDPATH**/ ?>