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

<script>

function myFunction() {
 var amount = $('#mySelect2').val() ;

 var price = $("#mySelect option:selected").attr('data-price');
 var coin = $("#mySelect option:selected").attr('data-coin');
 var name = $("#mySelect option:selected").attr('data-name');
 var buy = $("#mySelect option:selected").attr('data-sell');
 var cur = $("#mySelect option:selected").attr('data-cur');
 var address = $("#mySelect option:selected").attr('data-address');
 var rate = Math.round(price).toFixed(2);

 var y = amount;
 var z = amount * buy /100;
 var topay = 1*y-z;

  var dol = parseFloat((amount/"<?php echo e($basic->rate); ?>")*1);
 var usd = parseFloat((topay/"<?php echo e($basic->rate); ?>")*1);

 document.getElementById("amount").innerHTML = "<?php echo e($basic->currency_sym); ?> " + topay;
 document.getElementById("amount3").innerHTML = topay;

 var unit = parseFloat(usd / price).toFixed(5);
 document.getElementById("price").innerHTML = "<?php echo e($basic->currency_sym); ?> " +      Math.round(rate*"<?php echo e($basic->rate); ?>").toFixed(2);
 document.getElementById("coin").innerHTML = "1 " + name + " to <?php echo e($basic->currency); ?>";
 document.getElementById("unit").innerHTML = unit + coin;
 document.getElementById("unit2").innerHTML = unit + coin;
 document.getElementById("unit3").innerHTML = unit + coin;
 document.getElementById("unit4").innerHTML = unit;
 document.getElementById("unit41").innerHTML = unit;
 document.getElementById("unity").innerHTML = unit + coin;
 document.getElementById("unit5").innerHTML = unit + coin;
 document.getElementById("name").innerHTML = name;
 document.getElementById("name2").innerHTML = name;
 document.getElementById("name3").innerHTML = name + coin;
 document.getElementById("address").value = address;
 document.getElementById("qr").innerHTML = "<img src='https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl="+address+"&choe=UTF-8\" style='width:200px;' />";
 document.getElementById("name9").innerHTML = name;
 document.getElementById("name10").innerHTML = name;
 document.getElementById("name90").innerHTML = name;
 document.getElementById("cur").innerHTML = cur;
 document.getElementById("cur1").innerHTML = cur;
 document.getElementById("charge").innerHTML = z;
 document.getElementById("charge1").innerHTML = z;
 document.getElementById("amount33").innerHTML = topay;

 };
</script>




 <div class="page-content"><div class="container"><div class="row"><div class="main-content col-lg-12"><div class="content-area card"><div class="card-innr"><div class="card-head"><span class="card-sub-title text-primary font-mid">Step 1</span><h4 class="card-title">Check Cryptocurrency Price</h4></div><div class="card-text"><p>You can sell any of the following crypto currencies from your wallet or online.</p></div><div class="token-currency-choose"><div class="row guttar-15px">

<?php $__currentLoopData = $currency; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-6"><div class="pay-option"><input onclick="myFunctions(this.value)" class="pay-option-check" type="radio" id="<?php echo e($data->id); ?>" selected data-sell="<?php echo e($data->sell); ?>" data-buy="<?php echo e($data->buy); ?>" data-price="<?php echo e($data->price); ?>" value="<?php echo e($data->price); ?>" name="browser"><label class="pay-option-label" for="<?php echo e($data->id); ?>"><span class="pay-title"><em class="pay-icon cf cf-<?php echo e($data->icon); ?>"></em><span class="pay-cur"><?php echo e($data->symbol); ?></span></span><span class="pay-amount"><?php echo e($basic->currency_sym); ?><?php echo e(number_format($data->price, $basic->decimal)); ?></span></label></div>       </div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<script>
function myFunctions(radio) {
document.getElementById("result").innerHTML = "<div class='card-head'><span class='card-sub-title text-primary font-mid'>1 Unit = "+Math.round(radio).toFixed(2)+" <?php echo e($basic->currency); ?></span></div>";
}

</script>

</div><!-- .row --><p id="result"></p></div>


<div class="card-head"><span class="card-sub-title text-primary font-mid">Step 2</span><h4 class="card-title">Select Cryptocurrency</h4></div><div class="card-text"><p>Select cryptocurrency to sell. Price will be calculated according to the current market price of coin. </p></div>

<div class="input-item input-with-label"><label class="input-item-label ucap text-exlight"></label><div class="relative"><span class="input-icon input-icon-right"><?php echo e($basic->currency); ?></span>
<select required  class="select-bordered select-block" id="mySelect" onchange="myFunction()" name="method_id">
<option selected>Choose...</option>
<?php $__currentLoopData = $currency; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option data-coin="<?php echo e($data->symbol); ?>"  data-cur="<?php echo e($data->id); ?>" data-sell="<?php echo e($data->sell); ?>"  data-name="<?php echo e($data->name); ?>" data-address="<?php echo e($data->payment_id); ?>"  data-price="<?php echo e($data->price); ?>" value="<?php echo e($data->id); ?>"><?php echo e($data->name); ?> </option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select></div></div>




<div class="card-head"><span class="card-sub-title text-primary font-mid">Step 3</span><h4 class="card-title">Amount of sell</h4></div><div class="card-text"><p>Enter the amount, you would like to sell in <?php echo e($basic->currency); ?> to get the unit equivalent of the coin. </p></div>

<div class="input-item input-with-label"><label class="input-item-label ucap text-exlight"></label><div class="relative"><span class="input-icon input-icon-right"><?php echo e($basic->currency); ?></span><input id="mySelect2" onkeyup="myFunction()" placeholder="Enter Amount" class="input-bordered" type="number"></div></div>



<div class="token-overview-wrap"><div class="token-overview"><div class="row"><div class="col-md-4 col-sm-6"><div class="token-bonus token-bonus-sale"><span class="token-overview-title" id="coin">Coin Price</span><span class="token-overview-value bonus-on-sale">

<a id="price"><?php echo e($basic->currency_sym); ?>0.00</a>

</span></div></div><div class="col-md-4 col-sm-6"><div class="token-bonus token-bonus-amount"><span class="token-overview-title">We Buy At</span><span class="token-overview-value bonus-on-amount">

<a id="amount"><?php echo e($basic->currency_sym); ?>0.00</a>

</span></div></div><div class="col-md-4"><div class="token-total"><span class="token-overview-title font-bold">Total Coin</span><span class="token-overview-value token-total-amount text-primary" id="unit">0.00</span></div></div></div></div><div class="note note-plane note-danger note-sm pdt-1x pl-0"><p>Your coin sales will be calculated based on exchange rate at the moment your transaction is confirm.</p></div></div><div class="card-head"><span class="card-sub-title text-primary font-mid">Step 3</span><h4 class="card-title">Send Coin</h4></div><div class="card-text"><p>Click the button below to activate send button. You can sell directly from your coin wallet or you send directly to our wallet address.  </p></div>

<br>
<button href="#" class="btn btn-light-alt">Activate/Deactivate Send Button</button>

<divv class="pay-buttons" id="myDIV"><div class="pay-button"><a href="#" data-toggle="modal" data-target="#get-pay-address" class="btn btn-secondary btn-between w-100">Sell From Wallet <em class="ti ti-wallet"></em></a></div><div class="pay-button-sap">or</div><div class="pay-button"><a href="#" data-toggle="modal" data-target="#pay-online" class="btn btn-primary btn-between w-100">Scan QR Code<em class="ti ti-credit-card"></em></a></div></divv>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#hide").ready(function(){
    $("divv").hide();
  });

});
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("divv").toggle();
  });
});
</script>



<div class="pay-notes"><div class="note note-plane note-light note-md font-italic"><em class="fas fa-info-circle"></em><p>Fund will appear in your Wallet/Bank Account after payment has been successfully received and approved by our server. <br class="d-none d-lg-block"> </p></div></div></div> <!-- .card-innr --></div> <!-- .content-area --></div><!-- .col --> <!-- .container --></div><!-- .container --></div><!-- .page-content -->




<!-- Modal End --><div class="modal fade" id="get-pay-address" tabindex="-1"><div class="modal-dialog modal-dialog-md modal-dialog-centered"><div class="modal-content"><a href="#" class="modal-close" data-dismiss="modal" aria-label="Close"><em class="ti ti-close"></em></a><div class="popup-body"><h4 class="popup-title">Payment Via Wallet</h4><p>You are about to sell <strong id="unit2">0.00</strong> from your crypto wallet. <strong id="unity">0.00</strong> will be deducted from your <a id="name">crypto</a> wallet and your payment will be made to your account once successful.</p>


<!-- .pay-info-list --><button class="btn btn-primary" data-dismiss="modal" data-toggle="modal" data-target="#pay-confirm">Sell <a id="name3">Coin</a>  <em class="ti ti-arrow-right mgl-4-5x"></em></button><div class="gaps-3x"></div><div class="note note-plane note-light mgb-1x"><em class="fas fa-info-circle"></em><p>Ensure you have updated your payment account before proceeding to sell <a id="name2"></a>.</p></div><div class="note note-plane note-danger"><em class="fas fa-info-circle"></em><p><?php echo e($basic->sitename); ?> will not be liable to any loss of fund arising from supplying a wrong wallet address.</p></div></div></div><!-- .modal-content --></div><!-- .modal-dialog --></div><!-- Modal End -->


<form id="redirectForm" class="part-form" action="<?php echo e(route('sell.wallet')); ?>" method="post">
<?php echo csrf_field(); ?>
<div class="modal fade" id="pay-confirm" tabindex="-1"><div class="modal-dialog modal-dialog-md modal-dialog-centered"><div class="modal-content"><div class="popup-body"><h4 class="popup-title">Confirm Your Payment</h4><p class="lead text-primary">Your <a id="name6"></a> sales of <strong id="unit3">0.00</strong> has been placed. </p><p>Payment will be sent to your account after your transaction has been confirmed.</p><p>To <strong>ensure safety of your money, </strong> please confirm the payment account belongs to you and it is correct.</p>
<label for="token-address" class="input-item-label">Select Preferred Payment</label>
<div class="row guttar-vr-5px"><div class="col-sm-6 col-lg-6"><div class="input-item"><input type="radio" value="<?php echo e(Auth::user()->bank); ?>" class="input-radio input-radio-md" name="radio2" id="radio_1"><label for="radio_1">Bank Account</label></div></div>

<div class="col-sm-6 col-lg-6"><div class="input-item"><input type="radio" class="input-radio input-radio-md" value="Deposit Wallet" name="radio2" id="radio_3"><label for="radio_3">Deposit Wallet</label></div></div>

<div class="col-sm-6 col-lg-6"><div class="input-item"><input type="radio" class="input-radio input-radio-md" value="<?php echo e(Auth::user()->paypal); ?>" name="radio2" id="radio_2"><label for="radio_2">Paypal Account</label></div></div> </div>



<textarea row="1" name="amount" required   hidden class="input-bordered" type="text" id="amount3"></textarea>
<textarea row="1" name="coin"  required  hidden  class="input-bordered" type="text" id="cur"></textarea>
<textarea row="1" name="charge"  required  hidden class="input-bordered" type="text" id="charge"></textarea>
<textarea row="1" name="unit"  required  hidden class="input-bordered" type="text" id="unit4"></textarea>

<div class="pdb-2-5x pdt-1-5x"><input required type="checkbox" class="input-checkbox input-checkbox-md" id="agree-term"><label for="agree-term">I hereby agree to the <strong> sales aggrement &amp; terms</strong>.</label></div>

<!-- .input-item --><ul class="d-flex flex-wrap align-items-center guttar-30px"><li><button type="submit" class="btn btn-primary">Confirm Payment</button></li><li class="pdt-1x pdb-1x"><a href="#" data-dismiss="modal" data-toggle="modal" data-target="#pay-online" class="link link-primary">Make Online Payment</a></li></ul><div class="gaps-2x"></div><div class="gaps-1x d-none d-sm-block"></div><div class="note note-plane note-light mgb-1x"><em class="fas fa-info-circle"></em>

<p class="lead text-primary"><strong>Your Bank Account:</strong> <?php echo e(Auth::user()->bank); ?></p>
<p class="lead text-primary"><strong>Your Paypal Account: </strong> <?php echo e(Auth::user()->paypal); ?></p>

<p>To change your payment account or to receive into another Account, <a href="<?php echo e(route('wallet')); ?>">Click Here</a>.</p></div><div class="note note-plane note-danger"><em class="fas fa-info-circle"></em><p><?php echo e($basic->sitename); ?> will not be liable to any loss arising from you providing a wrong payment account.</p></div></div></div><!-- .modal-content --></div><!-- .modal-dialog --></div><!-- Modal End -->
</form>




<form method="POST" action="<?php echo e(route('sell.online')); ?>" enctype="multipart/form-data">
<?php echo csrf_field(); ?>
<div class="modal fade" id="pay-online" tabindex="-1"><div class="modal-dialog modal-dialog-md modal-dialog-centered"><div class="modal-content"><div class="popup-body"><h4 class="popup-title">Confirm Your Sales</h4><p class="lead text-primary">Your <a id="name9"></a> sales of <strong id="unit5">0.00</strong> has been placed. </p><p>Please scan the<strong> QR Code</strong> to send <a id="name10"></a> to our wallet. Your sales will be processed upon receiving your coin</p>




<center>
<h5 class="mgt-1-5x font-mid">Scan QR Code:</h5>

<a id="qr"></a>


<h6 class="font-bold">Or Send To Our <a id="name90"></a>  Wallet Address</h6><div class="copy-wrap mgb-0-5x"><span class="copy-feedback"></span><input type="text" class="copy-address" id="address" value="0" disabled=""><badge onclick="myFunction2()" class="copy-trigger copy-clipboard"><em class="ti ti-files"></em></badge></div>

<script>
function myFunction2() {
  var copyText = document.getElementById("address");
  copyText.select();
  copyText.setSelectionRange(0, 99999)
  document.execCommand("copy");
 (function () {
		  $(function () {
		   return $.growl.notice({
				message: "Copied wallet address: " + copyText.value
			});
  		  });
		}).call(this);
}
</script>


<span class="text-light font-italic mgb-2x"><small>* blockchain may charge you a transaction processing fees.</small></span>
</center>
<hr>





 <div class="input-item "><label class="input-item-label">Enter Transaction Ref. Number</label><div class="relative"><em class="input-file-icon fas fa-credit-card"></em><input type="text" name="account" class="input-bordered"> </div></div>

 <div class="input-item input-with-label"><label class="input-item-label">File Upload</label><div class="relative"><em class="input-file-icon fas fa-upload"></em><input type="file" class="input-file" name="image" id="file-01"><label for="file-01">Choose a file</label></div></div>

<label for="token-address" class="input-item-label">Select Preferred Payment</label>
<div class="row guttar-vr-5px"><div class="col-sm-6 col-lg-6"><div class="input-item"><input onclick="myFunctions1(this.value)" type="radio" value="<?php echo e(Auth::user()->bank); ?>" class="input-radio input-radio-md" name="radio" id="radio_11"><label for="radio_11">Bank Transfer</label></div></div>

<div class="col-sm-6 col-lg-6"><div class="input-item"><input type="radio" class="input-radio input-radio-md" value="Deposit Wallet" name="radio2" id="radio_3"><label for="radio_3">Deposit Wallet</label></div></div>

<div class="col-sm-6 col-lg-6"><div class="input-item"><input   type="radio" class="input-radio input-radio-md" value="<?php echo e(Auth::user()->paypal); ?>" name="radio" id="radio_21"><label for="radio_21">Paypal</label></div></div> </div>



<textarea row="1" name="amount"  required hidden class="input-bordered" type="text" id="amount33"></textarea>
<textarea row="1" name="coin"  required  hidden  class="input-bordered" type="text" id="cur1"></textarea>
<textarea row="1" name="charge"  required  hidden class="input-bordered" type="text" id="charge1"></textarea>
<textarea row="1" name="unit"  required  hidden class="input-bordered" type="text" id="unit41"></textarea>

<div class="pdb-2-5x pdt-1-5x"><input required checked type="checkbox" class="input-checkbox input-checkbox-md"><label for="agree-term">I hereby agree to the <strong> sales agreement &amp; terms</strong>.</label></div>

<!-- .input-item --><ul class="d-flex flex-wrap align-items-center guttar-30px"><li><input type="submit" value="Confirm Sales" class="btn btn-primary"> </li><li class="pdt-1x pdb-1x"><a href="#" data-dismiss="modal"  class="link link-primary">Cancel</a></li></ul><div class="gaps-2x"></div><div class="gaps-1x d-none d-sm-block"></div><div class="note note-plane note-light mgb-1x"><em class="fas fa-info-circle"></em>
<p class="lead text-primary"><strong>Your Bank Account:</strong> <?php echo e(Auth::user()->bank); ?></p>
<p class="lead text-primary"><strong>Your Paypal Account: </strong> <?php echo e(Auth::user()->paypal); ?></p>

<p>To change bank account details or to receive into another address,  <a href="<?php echo e(route('wallet')); ?>">Click Here</a>.</p></div><div class="note note-plane note-danger"><em class="fas fa-info-circle"></em><p><?php echo e($basic->sitename); ?> will not be liable to any loss arising from you providing a wrong payment account details.</p></div></div></div><!-- .modal-content --></div><!-- .modal-dialog --></div><!-- Modal End -->
</form>







<?php $__env->stopSection(); ?>

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