<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Deposit Funds</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
	<link rel="SHORTCUT ICON" href="https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Bitcoin.svg/1200px-Bitcoin.svg.png">
    <style>
        .container { max-width: 500px; margin-top: 50px; }
        .wallet-address { font-weight: bold; color: green; }
        body { background-color: #001322; }
        #qrCode { margin: 10px auto; display: block; }
        .steps { color: white; margin: 20px 0; }
    </style>
</head>
<body>
    <div class="container">
        <h2 class="text-center" style="color:white;">Deposit Funds</h2>

        <ul class="steps">
            <li>The minimum deposit is $50.</li>
            <li>Select your preferred payment gateway.</li>
            <li>Send the deposit to the provided wallet address.</li>
            <li>You will be automatically redirected to the dashboard once the payment is successfully processed.</li>
        </ul>

        <form id="depositForm" action="" method="post" enctype="multipart/form-data">
            <div class="mb-3">
                <label style="color:white;" class="form-label">Select Payment Gateway :</label>
                <select name="wallet_type" id="walletSelect" class="form-control" required>
                    <option value="">Payment Gateway</option>
                    <option value="Bitcoin" selected>Bitcoin</option>
                    <option value="Ethereum">Ethereum</option>
                    <option value="USDC">USDC</option>
                    <option value="USDT">USDT (TRC20)</option>
                    <option value="USDT_ERC20">USDT (ERC20)</option>
                </select>
            </div>

            <div class="info-card" id="content"></div>

        </form>

<div style="text-align: center;"><b style="display: block;margin-top: 50px;font-size: 25px;color: white;">Payment We Accept: </b>
<br>
<img id="logo" height="60" width="60" src="https://cryptologos.cc/logos/thumbs/bitcoin.png?v=032">
<img id="logo" height="60" width="60" src="https://cryptologos.cc/logos/ethereum-eth-logo.png?v=032">
<img id="logo" height="60" width="60" src="https://cryptologos.cc/logos/tether-usdt-logo.png?v=032">
<br>
<br>

</div>
    </div>
<br><br>            <center><button onclick="cancel()" type="submit" class="btn btn-danger ">Back to Dashboard</button></center>

<script>
    const selectElement = document.getElementById('walletSelect');
    const contentDiv = document.getElementById('content');


    function updateContent(selectedValue) {
        contentDiv.style.display = "block";

        switch (selectedValue) {
            case 'Bitcoin':
                contentDiv.innerHTML = `
            <div class="mb-3">
                <label style="color:white;" class="form-label">Please make deposit into this Wallet Address:</label><br>
                <label style="text-align:center;color:white;" class="form-label">Scan the QR code or copy the address to proceed with your payment:</label>

                <center>
                    <img src="https://www.bitcoinqrcodemaker.com/api/?style=bitcoin&address=bc1qpr6vwqkgfv9s5d2l7n880cl7sawq5rywl95kuq" alt="QR Code" style="max-width: 200px; margin-bottom: 10px;"><br>
                    <span id="walletAddress" class="wallet-address">bc1qpr6vwqkgfv9s5d2l7n880cl7sawq5rywl95kuq</span><br>
                    <button type="button" class="btn btn-secondary btn-sm mt-2" onclick="copyToClipboard('bc1qpr6vwqkgfv9s5d2l7n880cl7sawq5rywl95kuq')">Copy Address</button>
                </center>
            </div>

                `;
                break;

            case 'Ethereum':
                contentDiv.innerHTML = `

            <div class="mb-3">
                <label style="color:white;" class="form-label">Please make deposit into this Wallet Address:</label><br>
                <label style="text-align:center;color:white;" class="form-label">Scan the QR code or copy the address to proceed with your payment:</label>

                <center>
                    <img src="https://www.bitcoinqrcodemaker.com/api/?style=ethereum&address=0x50b6f8285c708dad4dec47f26eae0033059ba04f" alt="QR Code" style="max-width: 200px; margin-bottom: 10px;"><br>
                    <span id="walletAddress" class="wallet-address">0x50b6f8285c708dad4dec47f26eae0033059ba04f</span><br>
                    <button type="button" class="btn btn-secondary btn-sm mt-2" onclick="copyToClipboard('0x50b6f8285c708dad4dec47f26eae0033059ba04f')">Copy Address</button>
                </center>
            </div>
                `;
                break;

            case 'USDC':
                contentDiv.innerHTML = `

            <div class="mb-3">
                <label style="color:white;" class="form-label">Please make deposit into this Wallet Address:</label><br>
                <label style="text-align:center;color:white;" class="form-label">Scan the QR code or copy the address to proceed with your payment:</label>

                <center>
                    <img src="https://api.qrserver.com/v1/create-qr-code/?data=0x50b6f8285c708dad4dec47f26eae0033059ba04f" alt="QR Code" style="max-width: 200px; margin-bottom: 10px;"><br>
                    <span id="walletAddress" class="wallet-address">0x50b6f8285c708dad4dec47f26eae0033059ba04f</span><br>
                    <button type="button" class="btn btn-secondary btn-sm mt-2" onclick="copyToClipboard('0x50b6f8285c708dad4dec47f26eae0033059ba04f')">Copy Address</button>
                </center>
            </div>

                `;
                break;

            case 'USDT':
                contentDiv.innerHTML = `
            <div class="mb-3">
                <label style="color:white;" class="form-label">Please make deposit into this Wallet Address:</label><br>
                <label style="text-align:center;color:white;" class="form-label">Scan the QR code or copy the address to proceed with your payment:</label>

                <center>
                    <img src="https://api.qrserver.com/v1/create-qr-code/?data=TJAcV4v6ZJUv83NwMJaS83msUUvbP4wiyx" alt="QR Code" style="max-width: 200px; margin-bottom: 10px;"><br>
                    <span id="walletAddress" class="wallet-address">TJAcV4v6ZJUv83NwMJaS83msUUvbP4wiyx</span><br>
                    <button type="button" class="btn btn-secondary btn-sm mt-2" onclick="copyToClipboard('TJAcV4v6ZJUv83NwMJaS83msUUvbP4wiyx')">Copy Address</button>
                </center>
            </div>
                `;
                break;

            case 'USDT_ERC20':
                contentDiv.innerHTML = `

            <div class="mb-3">
                <label style="color:white;" class="form-label">Please make deposit into this Wallet Address:</label><br>
                <label style="text-align:center;color:white;" class="form-label">Scan the QR code or copy the address to proceed with your payment:</label>

                <center>
                    <img src="https://api.qrserver.com/v1/create-qr-code/?data=0x50b6f8285c708dad4dec47f26eae0033059ba04f" alt="QR Code" style="max-width: 200px; margin-bottom: 10px;"><br>
                    <span id="walletAddress" class="wallet-address">0x50b6f8285c708dad4dec47f26eae0033059ba04f</span><br>
                    <button type="button" class="btn btn-secondary btn-sm mt-2" onclick="copyToClipboard('0x50b6f8285c708dad4dec47f26eae0033059ba04f')">Copy Address</button>
                </center>
            </div>

                `;
                break;

            default:
                contentDiv.style.display = "none";
                break;
        }
    }

    document.addEventListener('DOMContentLoaded', () => {
        const selectedValue = selectElement.value || 'Bitcoin'; 
        updateContent(selectedValue);
    });

    selectElement.addEventListener('change', function () {
        updateContent(this.value);
    });


        function copyToClipboard(walletAddress) {
            navigator.clipboard.writeText(walletAddress).then(() => {
                alert("Address copied to clipboard!");
            }).catch(err => {
                console.error("Could not copy text: ", err);
            });
        }


        function cancel() {
            window.history.go(-1);
        }

    </script>
</body>
</html>
