<?php $__env->startSection('title', 'Subscription Cancel'); ?>
<?php $__env->startSection('content'); ?>
<div class="wizard row">
    <div class="col-md-12 pd-4">
      <div class="box ">
        <!-- title of the page and heading-->
        <div class="box-header with-border main-box">
          <i class="ion ion-clipboard"></i>
          <h3 class="box-title">Subscription Cancel</h3>
        </div> 
        <!--end title-->
        <!-- start body of the page--> 
        <!-- start box body --> 
        <div class="box-body">
          <div class="col-12">
              <?php
                //dd($plans);
                $pname = $plans->plan_name;
              ?>
              <?php $__currentLoopData = $slugname_arr; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $slugname): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <?php if($pname==$slugname): ?>
                      <?php
                          $invoice_plan_name = $display_name_arr[$slugname];
                      ?>
                  <?php endif; ?>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              <?php if($plans->date_cancel_at!=""): ?>
                <div class="form-group col-md-12">
                    <?php if($plans->date_cancel_at): ?>
                      <div class="box-header with-border">
                          <span style="color: red;font-size: 18px;">
                              <div class="form-group col-md-12">  
                                  Your Cancellation Request for <?php echo e($invoice_plan_name); ?> is under processing.
                              </div>
                              <div class="form-group col-md-12">
                                  Cancellation Initiated at : <?php echo e($plans->date_cancelled_at); ?>

                              </div>
                              <div class="form-group col-md-12">
                                  It will be cancelled on <?php echo e($plans->date_cancel_at); ?>

                              </div>
                          </span>
                      </div>
                    <?php endif; ?>
                </div>
              <?php endif; ?>
              <?php if($plans->date_cancel_at==""): ?>
                <form id="payment-form" action="<?php echo e(URL::to('/subscription_cancel_post')); ?>" method="POST">
                  <?php echo csrf_field(); ?>

                  <div class="form-group ">
                      <div class="col-12">
                          <span style="font-size: 18px;">
                              You have an active subscription of <?php echo e($plans->currency); ?> <?php echo e($plans->amount); ?> per <?php echo e($plans->payment_interval); ?> for <span style="color: blue;"> <?php echo e($invoice_plan_name); ?> </span> Plan
                          
                          </span>
                      </div>
                  </div>
                  <div class="form-group">
                        <div class="col-12">
                            <span style="font-size: 18px;">
                                Subscription Activated From : <?php echo e($plans->subscription_start); ?>

                                <br>
                                Subscription Active Till <?php echo e($plans->subscription_end); ?>

                            </span>
                        </div>
                  </div>
                  
                  <div class="form-group">
                      <div class="col-6">
                       
                          <label style="color: blue;">Please Click the button to Cancel the plan.</label>
                          <br>
                          <input type="hidden" name="email" id="email" value="<?php echo e($email); ?>">
                          <button type="submit" class="btn btn-primary btn-sm" onClick='return confirmCancel();'>Cancel</button>
                        
                      </div>
                  </div>
                </form>
              <?php endif; ?>
          </div>
        </div>
      </div>
    </div>
</div>
<script>
  function confirmCancel() 
  {
      var result = confirm('Are you sure you want to Cancel Your Active Plan?');

      if (result) 
      {
          return true;
      } 
      else 
      {
          return false;
      }
  }
  </script>
<?php $__env->stopSection(); ?> 
<?php echo $__env->make('adminlte::page', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>