<?php $__env->startSection('content'); ?>
<script type="text/javascript">
    if (window.performance && window.performance.navigation.type == window.performance.navigation.TYPE_BACK_FORWARD) {
        location.reload();
    }
</script>
 <div class="nk-content">
                        <div class="container-fluid">                            <div class="nk-content-body">
                                <div class="buysell widse-xs m-aussto">
                                <br><br><br>

                                    <div class="buysell-block">
                                     <div class="buysell-title text-center"><h4 class="title text-primary"><?php echo e($network->name); ?> Subscription Plan</h4></div>
                                        <form method="post" class="buysell-form" action="<?php echo e(route('cabletvpost2')); ?>">
                                        <?php echo csrf_field(); ?>


                                       <center> <span class="pm-icosn"><div class="user-avastar lg"><img src="<?php echo e(asset($network->image)); ?> " width="89"
                             alt="Avatar"></div></span></center>


                                            <div class="buysell-field form-group">
                                                  <div class="invest-field form-group">
                                                    <div class="form-label-group"><label class="form-label">Select Subscription Plan</label></div>


                                                     <script type="text/javascript">

                                                        function goDoSomething1(identifier){

                                                  document.getElementById("amount").value = $(identifier).data('amount');
                                                  document.getElementById("plan").value = $(identifier).data('plan');
                                                  document.getElementById("name").value = $(identifier).data('name');
                                                   }

                                                    </script>

                                                    <div class="invest-amount-group g-2">
                                                     <?php $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <div class="invest-amount-item">
                                                            <input type="radio" class="invest-amount-control" name="plan"  onclick="goDoSomething1(this);"  data-plan="<?php echo e($data['pid']); ?>"  data-amount="<?php echo e($data['reseller_price']); ?>"  data-name="<?php echo e($data['name']); ?>" id="iv-amount-<?php echo e($data['pid']); ?>" /><label class="invest-amount-label" for="iv-amount-<?php echo e($data['pid']); ?>"><?php echo e($data['name']); ?></label>
                                                        </div>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    </div>
                                                </div>
                                                </div>
                                            </div><br>

                                            <div class="buysell-field form-group">
                                                <div class="form-label-group"><label class="form-label" form-note-alt for="buysell-amount">Unit Amount</label></div>
                                                <div class="form-control-group">
                                                    <input type="text" class="form-control form-control-lg form-control-number" readonly  id="amount" name="amount" placeholder="0.00" />
                                                    <div class="form-dropdown">
                                                        <div class="text"><?php echo e($basic->currency_sym); ?><span></span></div>

                                                    </div>
                                                </div>

                                            </div>
                                            <input id="plan" name="plan" hidden>
                                            <input id="name" name="name" hidden>
                                             <input name="decoder" value="<?php echo e($network->code); ?>"  hidden>


                                             <div class="buysell-field form-group">
                                                <div class="form-label-group"><label class="form-label" for="buysell-amount">Enter <?php echo e($network->name); ?> <?php if($network->id == 2): ?> IUC <?php else: ?> Smart Card <?php endif; ?> Number</label></div>
                                                <div class="form-control-group">
                                                    <input type="number" class="form-control form-control-lg form-control-number" id="buysell-amount" name="number" placeholder="1234567890" />

                                                </div>
                                             </div>

                                             <?php if(Auth::user()->setpin == 1): ?>
                                            <div class="buysell-field form-action"><a href="#" class="btn btn-lg btn-block btn-primary" data-toggle="modal" data-target="#enterpin">Continue</a></div>
                                            <?php else: ?>
                                             <div class="buysell-field form-action"><button type="submit" class="btn btn-lg btn-block btn-primary">Continue</button></div>

                                            <?php endif; ?>
                                            <div class="form-note text-base text-center">Note: our transfer fee included, <a href="#">see our fees</a>.</div>

                                    </div>
                                </div>
                            </div>
                        </div>

         <div class="modal fade" tabindex="-1" id="enterpin">
            <div class="modal-dialog modal-dialog-centered modal-md">
                <div class="modal-content">
                    <div class="modal-body modal-body-md text-center">
                        <div class="nk-modal">
                            <h4 class="nk-modal-title">Enter Transaction Password</h4>
                            <div class="nk-modal-text">
                                <p>
                                    Please enter your Wallet Transaction Password in order complete this transaction or click on the cancel button to discontinue transaction process..
                                </p>
                            </div>
                            <div class="nk-modal-form">
                                <div class="form-group"><input type="password" name="pin" class="form-control form-control-password-big text-center" /></div>
                            </div>
                            <div class="nk-modal-action">
                                <button type="submit" class="btn btn-lg btn-mw btn-primary" >Confirm Process</button>
                                <div class="sub-text sub-text-alt mt-3 mb-4">This transaction will be debited from your deposit wallet balance.</div>
                                <a href="#" class="link link-soft" data-dismiss="modal">Cancel and return</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
 </form>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('include.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>