    <div class="page-container">
        <div class="main-content">
            <div class="section-gap">
                <div class="container-fluid">
<!--Page Content-->
                        <div class="row">
        <div class="col-xl-12">
            <div class="site-card">
                <div class="site-card-header">
                    <h3 class="title">Wallet Exchange</h3>
                </div>
                <?php if(explode(',', $GLOBALS['toast_alert'])[0] == false || explode(',', $GLOBALS['toast_alert'])[0] == "'error'"){ ?>
                <div class="site-card-body">
                    <div class="progress-steps">
                        <div class="single-step current">
                            <div class="number">01</div>
                            <div class="content">
                                <h4>Wallet Details</h4>
                                <p>Enter your Wallet details</p>
                            </div>
                        </div>
                        <div class="single-step ">
                            <div class="number">02</div>
                            <div class="content">
                                <h4>Success</h4>
                                <p>Successfully Exchanged</p>
                            </div>
                        </div>
                    </div>
                        <div class="progress-steps-form">
        <form action="/user/wallet-exchange" method="post">
              <div class="row">
                <div class="col-xl-4 col-md-12">
                    <label for="exampleFormControlInput1" class="form-label">From Wallet:</label>
                    <div class="input-group">
                        <select name="from_wallet" class="site-nice-select" id="transfer_from_w" onchange="transfer_W_onchange(this)">
                            <option value="Main Wallet">Main Wallet (<?php echo number_format($wallet_balance,2); ?> USD)</option>
                            <option value="Profit Wallet">Profit Wallet (<?php echo number_format($total_profit,2); ?> USD)</option>
                        </select>
                    </div>
                </div>
                <input type="hidden" name="profitbal" id="profitbal" value="<?php echo $total_profit; ?>">
                <input type="hidden" name="walletbal" id="walletbal" value="<?php echo $wallet_balance; ?>">
                <div class="col-xl-4 col-md-12">
                    <label for="exampleFormControlInput1" class="form-label">Enter Amount:</label>
                    <div class="input-group">
                        <input type="number" name="amount" id="amount" max="<?php echo $wallet_balance; ?>" min="0" class="form-control" oninput="this.value = validateDouble(this.value)" aria-label="Amount"  aria-describedby="basic-addon1" required>
                        <span class="input-group-text" id="basic-addon1">USD</span>
                    </div>
                    <div class="input-info-text charge"></div>
                </div>

                <div class="col-xl-4 col-md-12">
                    <label for="exampleFormControlInput1" class="form-label">To Wallet:</label>
                    <div class="input-group">
                        <select name="to_wallet" class="site-nice-select" id="transfer_to_w">
                        <option value="Profit Wallet">Profit Wallet (<?php echo number_format($total_profit,2); ?> USD)</option>
                        <option value="Main Wallet">Main Wallet (<?php echo number_format($wallet_balance,2); ?> USD)</option>
                        </select>
                    </div>

                </div>

            </div>
            <script>
					 function transfer_W_onchange(transfer_from_w){
					var transfer_to_w = document.querySelector('#transfer_to_w');
                    var walletbal = $('#walletbal').val();
                    var profitbal = $('#profitbal').val();

						if(transfer_from_w.value == 'Main Wallet'){
                            console.log(transfer_from_w.value);
							transfer_to_w.selectedIndex = 0;
                        $('#amount').attr('max',walletbal);

						}else if(transfer_from_w.value == 'Profit Wallet'){
                            console.log(transfer_from_w.value);
							transfer_to_w.selectedIndex = 1;
                            $('#amount').attr('max',profitbal);
						}
                        $('#transfer_to_w').niceSelect('update');
					}
					</script>

            <div class="transaction-list table-responsive">
                <div class="user-panel-title">
                    <h3>Review Details:</h3>
                </div>
                <table class="table">
                    <tbody>
                    <tr>
                        <td><strong>Amount</strong></td>
                        <td><span class="amount"></span> <span class="currency"></span></td>
                    </tr>
                    <tr>
                        <td><strong>Charge</strong></td>
                        <td class="charge2"></td>
                    </tr>
                    <tr>
                        <td><strong>Total</strong></td>
                        <td class="total"></td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                <button type="submit" name="send_funds_wallet" class="site-btn blue-btn">
                    Proceed to Exchange<i class="anticon anticon-double-right"></i>
                </button>
            </div>
        </form>
    </div>
                </div>
                <?php }else{ $data = explode(':',trim(explode(',', $GLOBALS['toast_alert'])[2],"'")); ?>
                    <div class="site-card-body">
                    <div class="progress-steps">
                        <div class="single-step current">
                            <div class="number">01</div>
                            <div class="content">
                                <h4>Wallet Details</h4>
                                <p>Enter your Wallet details</p>
                            </div>
                        </div>
                        <div class="single-step current">
                            <div class="number">02</div>
                            <div class="content">
                                <h4>Success</h4>
                                <p>Success Your Exchange Money Process</p>
                            </div>
                        </div>
                    </div>
                        <div class="progress-steps-form">
        <div class="transaction-status centered">
            <div class="icon success">
                <i class="anticon anticon-check"></i>
            </div>
            <h2>$<?php echo $data[1]; ?> Wallet Transfer Successfully</h2>
            <p><?php echo $data[2]; ?></p>
            <p>Transaction ID: <?php echo $data[0]; ?> </p>
            <a href="/user/wallet-exchange" class="site-btn">
                <i class="anticon anticon-plus"></i>Transfer Wallet again
            </a>
        </div>
    </div>
                </div>
                <?php } ?>
            </div>
        </div>
    </div>
                    <!--Page Content-->
                </div>
            </div>
        </div>
    </div>