

<?php $__env->startSection('content'); ?>
<div class="app-container">
    <header>
        <button class="back-btn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="logo">Confirm Deposit</div>
    </header>

    <section class="confirm-deposit-section">
        <div class="deposit-qr-section">
            <div class="qr-code-container">
                <!-- QR Code will be generated here -->
                <img src="https://api.qrserver.com/v1/create-qr-code/?data=<?php echo e($coin->wallet_address); ?>" alt="QR Code" class="imaged square w140">
            </div>
            <div class="wallet-address-container">
                <input 
                    type="text" 
                    id="depositWalletAddress" 
                    value="<?php echo e($coin->wallet_address); ?>" 
                    readonly
                >
                <button id="copyAddressBtn" class="btn-copy">
                    <i class="fas fa-copy"></i>
                </button>
            </div>
        </div>

        <form class="confirm-deposit-form" action="<?php echo e(route('user.deposit.confirm.submit')); ?>" method="POST" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>
            <div class="deposit-info">
                <div class="info-item">
                    <span>Coin</span>
                    <span id="depositCoinDisplay"><?php echo e($coin->name); ?> (<?php echo e($coin->symbol); ?>)</span>
                </div>
                <div class="info-item">
                    <span>Amount</span>
                    <span id="depositAmountDisplay"> <?php echo e(number_format($amount, 8)); ?> <?php echo e($coin->symbol); ?></span>
                </div>
            </div>

            <div class="input-group transaction-id">
                <label>Transaction ID</label>
                <input 
                    type="text" 
                    placeholder="Enter transaction ID" 
                    id="transactionId"
                    name="transaction_id"
                    required
                >
            </div>

            <div class="input-group proof-upload">
                <label>Upload Transaction Proof</label>
                <div class="">
                    <input 
                    class="form-group"
                        type="file" 
                        id="transactionProof" 
                        accept="jpg, png" 
                        name="proof" required
                    >
                   
                </div>
            </div>

            <button type="submit" class="btn-submit-deposit">Submit Deposit</button>
        </form>
    </section>

    
 <script>
    document.getElementById('copyAddressBtn').addEventListener('click', function() {
        var copyText = document.getElementById('depositWalletAddress');
        copyText.select();
        copyText.setSelectionRange(0, 99999); // For mobile devices

        document.execCommand('copy'); // Copy to clipboard

        // Optional: Provide feedback
        alert('Wallet address copied: ' + copyText.value);
    });
</script>


<style>
.form-group  {
    width: 100%;
    background: black;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    margin-top: 10px;
    padding: 8px;
    border-radius: 12px;
}
.confirm-deposit-section {
    padding: 20px;
}

.deposit-qr-section {
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-code-container canvas {
    background-color: white;
    padding: 10px;
    border-radius: 10px;
}

.wallet-address-container {
    display: flex;
    background-color: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.wallet-address-container input {
    flex-grow: 1;
    padding: 15px;
    background: none;
    border: none;
    color: var(--text-primary);
    text-align: center;
}

.btn-copy {
    background-color: var(--accent-green);
    color: var(--text-primary);
    border: none;
    padding: 10px 15px;
}

.confirm-deposit-form {
    background-color: var(--card-background);
    border-radius: 15px;
    padding: 20px;
}

.deposit-info {
    background-color: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.7);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.7);
}

.input-group input[type="text"] {
    width: 100%;
    background-color: rgba(255,255,255,0.05);
    border: none;
    border-radius: 10px;
    padding: 15px;
    color: var(--text-primary);
}

.file-upload {
    background-color: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
}

.file-upload input[type="file"] {
    display: none;
}

.btn-submit-deposit {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-green);
    color: var(--text-primary);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-submit-deposit:hover {
    background-color: #01a866;
    transform: translateY(-2px);
}
</style>

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

<?php echo $__env->make('layouts.user', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/qfsworl3/public_html/resources/views/user/confirm_deposit.blade.php ENDPATH**/ ?>