<?php echo $__env->make('layout.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<div class="recharge">
    <!-- HEADER -->
    <nav class="top_nav">
        <div class="left">
            <a href="<?php echo e(url('/user/dashboard')); ?>">
                <img src="<?php echo e(asset('assets/img/back_arrow.png')); ?>" />
            </a>
            <span>Withdrawal</span>
        </div>
        <div class="right">
            <a href="<?php echo e(url('/user/withdrawalRecord')); ?>">
                <i class="bi bi-list" style="font-size: 25px;"></i>
            </a>
        </div>
    </nav>
    <!-- HEADER -->

    <!-- BALANCE -->
    <form id="withdrawForm">
        <?php echo csrf_field(); ?>
        <input type="hidden" name="withdraw_fee" id="withdraw_fee" value="<?php echo e($payment_settings->withdrawal_charges); ?>">
        <input type="hidden" name="card_id" id="card_id">
        <div class="recharge_box">
            <p class="top_text">Balance: ₹ <span><?php echo e($wallet->amount); ?></span></p>
            <?php if($wallet->amount < $payment_settings->min_withdrawal_amount): ?>
                <p class="top_text mt-0 pt-0 error">You don't have enough balance in your wallet to withdraw.</span></p>
                <?php else: ?>
                <div class="code_input_box flex-column">
                    <div class="code_input w-100">
                        <img src="<?php echo e(asset('assets/img/withdraw_input.png')); ?>" />
                        <input type="number" class="w-100" placeholder="Enter withdrawal amount" name="withdrawal_amount" id="withdrawal_amount" min="<?php echo e($payment_settings->min_withdrawal_amount); ?>" onkeyup="checkWithdrawalAmount()" max="<?php echo e($wallet->amount); ?>" />
                    </div>
                    <div class="error"><span id="withdrawal_amount_error"></span></div>
                </div>
                <div class="text_field">
                    <p>
                        Fee: <span><?php echo e($payment_settings->withdrawal_charges); ?>%</span>, to account
                        <span id="after_fee">0</span>
                    </p>
                </div>
                <div class="payment_box">
                    <p class="payment_text mb-0">Payout</p>
                    <div class="van-radio-group">
                        <div class="van-radio">
                            <div class="van-radio__icon">
                                <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">
                                    <polyline fill="none" stroke="#000" stroke-width="2" points="2 14 9 20 22 4"></polyline>
                                </svg>
                            </div>
                            <span class="van-radio__label ps-2"><span class="text">Bankcard</span></span>
                        </div>
                    </div>
                </div>
                <div class="add_card">
                    <div class="accordion accordion-flush" id="accordionFlushExample">
                        <!-- SELECT BANK -->
                        <div class="accordion-item">
                            <h2 class="accordion-header" id="flush-headingSixth">
                                <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseSixth" aria-expanded="false" aria-controls="flush-collapseSixth">
                                    <img class="card_" src="<?php echo e(asset('assets/img/bank_card.png')); ?>" /><span class="ms-5">Select Bank Card</span>
                                </button>
                            </h2>
                            <div id="flush-collapseSixth" class="accordion-collapse collapse" aria-labelledby="flush-headingSixth" data-bs-parent="#accordionFlushExample">
                                <div class="accordion-body pt-0">
                                    <div>
                                        <?php if(count($bank_details) > 0): ?>
                                        <?php $__currentLoopData = $bank_details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $bank): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <div class="text-dark text-decoration-none withdraw_banks_options" id="<?php echo e($bank->id); ?>" data-name="<?php echo e($bank->name); ?>" onclick="selectCard(this.id)">
                                            <?php echo e($bank->name); ?>

                                        </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php else: ?>
                                        <a class="text-dark text-decoration-none" href="<?php echo e(url('/user/bankCard')); ?>">
                                            Add Bank Card
                                        </a>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- SELECT BANK -->
                    </div>
                </div>
                <div class="password_box">
                    <div class="box_border">
                        <img src="<?php echo e(asset('assets/img/password.png')); ?>" />
                        <input type="password" placeholder="Enter your login password" name="password" required />
                    </div>
                </div>
                <!-- BALANCE -->

                <div class="container-fluid pb-5 pt-4">
                    <div class="row">
                        <div class="col-10 col-md-8 col-lg-6 mx-auto">
                            <input type="submit" id="submit" disabled="disabled" class="w-100 btn btn-primary" value="Withdrawal" />
                        </div>
                    </div>
                </div>
                <?php endif; ?>
        </div>
    </form>
</div>


<script>
    let min = parseInt("<?php echo e($payment_settings->min_withdrawal_amount); ?>");
    let max = parseInt("<?php echo e($wallet->amount); ?>");
</script>
<?php echo $__env->make('layout.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/shyambabamatka/public_html/zupitogames.com/resources/views/userDashboard/withdrawal.blade.php ENDPATH**/ ?>