<?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">Convert Airtime To Cash</h4></div>
                                        <form method="post" class="buysell-form" action="<?php echo e(route('convertairtimepost')); ?>">
                                        <?php echo csrf_field(); ?>
                                            <div class="buysell-field form-group">
                                                  <div class="invest-field form-group">
                                                    <div class="form-label-group"><label class="form-label">Choose Amount to Convert</label></div>


                                                     <script type="text/javascript">

                                                        function goDoSomething1(identifier){

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

                                                    </script>

                                                    <div class="invest-amount-group g-2">
                                                        <div class="invest-amount-item">
                                                            <input type="radio" class="invest-amount-control" name="iv-amount"  onclick="goDoSomething1(this);"  data-amount="100" id="iv-amount-1" /><label class="invest-amount-label" for="iv-amount-1"><?php echo e($basic->currency_sym); ?> 100</label>
                                                        </div>
                                                        <div class="invest-amount-item">
                                                            <input type="radio" class="invest-amount-control" name="iv-amount" onclick="goDoSomething1(this);"  data-amount="250" id="iv-amount-2" /><label class="invest-amount-label" for="iv-amount-2"><?php echo e($basic->currency_sym); ?> 250</label>
                                                        </div>
                                                        <div class="invest-amount-item">
                                                            <input type="radio" class="invest-amount-control" name="iv-amount" onclick="goDoSomething1(this);"  data-amount="500" id="iv-amount-3" /><label class="invest-amount-label" for="iv-amount-3"><?php echo e($basic->currency_sym); ?> 500</label>
                                                        </div>
                                                        <div class="invest-amount-item">
                                                            <input type="radio" class="invest-amount-control" onclick="goDoSomething1(this);"  data-amount="1000" name="iv-amount" id="iv-amount-4" /><label class="invest-amount-label" for="iv-amount-4"><?php echo e($basic->currency_sym); ?> 1,000</label>
                                                        </div>
                                                        <div class="invest-amount-item">
                                                            <input type="radio" class="invest-amount-control" onclick="goDoSomething1(this);"  data-amount="1500" name="iv-amount" id="iv-amount-5" /><label class="invest-amount-label" for="iv-amount-5"><?php echo e($basic->currency_sym); ?> 1,500</label>
                                                        </div>
                                                        <div class="invest-amount-item">
                                                            <input type="radio" class="invest-amount-control" onclick="goDoSomething1(this);"  data-amount="2000" name="iv-amount" id="iv-amount-6" /><label class="invest-amount-label" for="iv-amount-6"><?php echo e($basic->currency_sym); ?> 2,000</label>
                                                        </div>
                                                    </div>
                                                </div>
                                                </div>
                                            </div><br>

                                            <div class="buysell-field form-group">
                                                <div class="form-label-group"><label class="form-label" for="buysell-amount">Or Enter Amount Directly</label></div>
                                                <div class="form-control-group">
                                                    <input type="text" class="form-control form-control-lg form-control-number" 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 class="form-note-group"><span class="buysell-min form-note-alt">Minimum: 100.00 <?php echo e($basic->currency); ?></span></div>
                                            </div>


                                             <div class="buysell-field form-group">
                                                <div class="form-label-group"><label class="form-label" for="buysell-amount">Enter Phone Number</label></div>
                                                <div class="form-control-group">
                                                    <input type="number" class="form-control form-control-lg form-control-number" id="buysell-amount" name="phone" placeholder="+2341234567890" />

                                                </div>
                                             </div>
                                             
                                             <div class="buysell-field form-group">
                                                <div class="form-label-group"><label class="form-label" for="buysell-amount">Confirm Phone Number</label></div>
                                                <div class="form-control-group">
                                                    <input type="number" class="form-control form-control-lg form-control-number" id="buysell-amount" name="phone2" placeholder="+2341234567890" />

                                                </div>
                                             </div>
                                            <div class="buysell-field form-group">
                                                <div class="form-label-group"><label class="form-label">Network</label></div>
                                                <div class="form-pm-group">
                                                    <ul class="buysell-pm-list">
                                                    <?php $__currentLoopData = $network; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <li class="buysell-pm-item">
                                                            <input class="buysell-pm-control" type="radio" name="network" value="<?php echo e($data->code); ?>" id="pm-paypal<?php echo e($data->id); ?>" />
                                                            <label class="buysell-pm-label" for="pm-paypal<?php echo e($data->id); ?>">
                                                                <span class="pm-name"><?php echo e($data->name); ?></span><span class="pm-icon"><div class="user-avatar sm"><img src="<?php echo e(asset($data->image)); ?> " width="100"
                             alt="Avatar"></div></span>
                                                            </label>
                                                        </li>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                                                                           </ul>
                                                </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 to Recharge</a></div>
                                            <?php else: ?>
                                             <div class="buysell-field form-action"><button type="submit" class="btn btn-lg btn-block btn-primary">Convert</button></div>

                                            <?php endif; ?>
                                            <div class="form-note text-base text-center">Note: our transaction 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">The equivalent of your airtime to be converted will be credited to your deposit wallet balance once approved.</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(); ?>