
<?php $__env->startSection('title', 'Site Settings'); ?>

<?php $__env->startPush('head'); ?>
    <?php $vSettings = @filemtime(public_path('css/admin-settings.css')) ?: '1'; ?>
    <link rel="stylesheet" href="<?php echo e(asset('css/admin-settings.css')); ?>?v=<?php echo e($vSettings); ?>">
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
<div class="settings-page">
    <div class="settings-page-header">
        <h1>
            <svg class="settings-gear-icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                <path d="M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"/>
            </svg>
            Settings
        </h1>
        <p>Manage your site configuration and trading preferences.</p>
    </div>

    <div class="settings-panel">
        <form method="POST" action="<?php echo e(route('admin.settings.update')); ?>" id="settingsForm">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>

            <h2 class="settings-section-title">Site Configuration</h2>
            <div class="settings-form-grid">
                <div class="form-field">
                    <label for="site_title">Site Title</label>
                    <input id="site_title" name="site_title" class="md-input settings-input" value="<?php echo e($settings['site_title'] ?? ''); ?>">
                </div>
                <div class="form-field">
                    <label for="site_currency">Site Currency</label>
                    <input id="site_currency" name="site_currency" class="md-input settings-input" value="<?php echo e($settings['site_currency'] ?? ''); ?>">
                </div>
                <div class="form-field">
                    <label for="currency_symbol">Currency Symbol</label>
                    <input id="currency_symbol" name="currency_symbol" class="md-input settings-input" value="<?php echo e($settings['currency_symbol'] ?? ''); ?>">
                </div>
                <div class="form-field">
                    <label for="signup_bonus">Signup Bonus ($)</label>
                    <input id="signup_bonus" name="signup_bonus" type="number" step="0.00000001" class="md-input settings-input" value="<?php echo e($settings['signup_bonus'] ?? '0'); ?>">
                </div>
                <div class="form-field">
                    <label for="transfer_min_limit">Transfer Min Limit ($)</label>
                    <input id="transfer_min_limit" name="transfer_min_limit" type="number" step="0.00000001" class="md-input settings-input" value="<?php echo e($settings['transfer_min_limit'] ?? '0'); ?>">
                </div>
                <div class="form-field">
                    <label for="transfer_charge">Transfer Charge (%)</label>
                    <input id="transfer_charge" name="transfer_charge" type="number" step="0.00000001" class="md-input settings-input" value="<?php echo e($settings['transfer_charge'] ?? '0'); ?>">
                </div>
                <div class="form-field">
                    <label for="crypto_api_key">Crypto API Key</label>
                    <input id="crypto_api_key" name="crypto_api_key" class="md-input settings-input" value="<?php echo e($settings['crypto_api_key'] ?? ''); ?>">
                </div>
                <div class="form-field">
                    <label for="admin_whatsapp">Admin WhatsApp</label>
                    <input id="admin_whatsapp" name="admin_whatsapp" class="md-input settings-input" value="<?php echo e($settings['admin_whatsapp'] ?? ''); ?>">
                </div>
                <div class="form-field">
                    <label for="admin_telegram">Admin Telegram</label>
                    <input id="admin_telegram" name="admin_telegram" class="md-input settings-input" value="<?php echo e($settings['admin_telegram'] ?? ''); ?>">
                </div>
            </div>

            <h2 class="settings-section-title">Wallet Addresses</h2>
            <p class="settings-wallet-hint">
                ETH, BSC, Polygon, USDT/ERC20, and USDC use the same EVM wallet address — update <strong>ETH</strong> and the linked networks sync automatically.
            </p>
            <div class="settings-form-grid">
                <div class="form-field">
                    <label for="wallet_btc">BTC Wallet Address</label>
                    <input id="wallet_btc" name="wallet_btc" class="md-input settings-input" value="<?php echo e($settings['wallet_btc'] ?? ''); ?>">
                </div>
                <div class="form-field">
                    <label for="wallet_eth">ETH Wallet Address</label>
                    <input id="wallet_eth" name="wallet_eth" class="md-input settings-input js-evm-master" value="<?php echo e($settings['wallet_eth'] ?? ''); ?>" autocomplete="off">
                </div>
                <div class="form-field">
                    <label for="wallet_bsc">BSC Wallet Address</label>
                    <input id="wallet_bsc" name="wallet_bsc" class="md-input settings-input js-evm-linked" value="<?php echo e($settings['wallet_bsc'] ?? ''); ?>" readonly>
                </div>
                <div class="form-field">
                    <label for="wallet_trc20">TRC20 Wallet Address</label>
                    <input id="wallet_trc20" name="wallet_trc20" class="md-input settings-input" value="<?php echo e($settings['wallet_trc20'] ?? ''); ?>">
                </div>
                <div class="form-field">
                    <label for="wallet_polygon">Polygon Wallet Address</label>
                    <input id="wallet_polygon" name="wallet_polygon" class="md-input settings-input js-evm-linked" value="<?php echo e($settings['wallet_polygon'] ?? ''); ?>" readonly>
                </div>
                <div class="form-field">
                    <label for="wallet_solana">Solana Wallet Address</label>
                    <input id="wallet_solana" name="wallet_solana" class="md-input settings-input" value="<?php echo e($settings['wallet_solana'] ?? ''); ?>">
                </div>
                <div class="form-field">
                    <label for="wallet_usdt_erc20">USDT/ERC20 Wallet Address</label>
                    <input id="wallet_usdt_erc20" name="wallet_usdt_erc20" class="md-input settings-input js-evm-linked" value="<?php echo e($settings['wallet_usdt_erc20'] ?? ''); ?>" readonly>
                </div>
                <div class="form-field">
                    <label for="wallet_usdc">USDC Wallet Address</label>
                    <input id="wallet_usdc" name="wallet_usdc" class="md-input settings-input js-evm-linked" value="<?php echo e($settings['wallet_usdc'] ?? ''); ?>" readonly>
                </div>
            </div>

            <button type="submit" class="settings-update-btn">Update Information</button>
        </form>
    </div>

    <div class="settings-extras">
        <div class="settings-trading-row">
            <span class="settings-trading-label">Trading Mode:</span>
            <div class="settings-mode-badges">
                <?php $__currentLoopData = ['win' => 'WIN', 'auto' => 'AUTO', 'loss' => 'LOSS']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mode => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <form method="POST" action="<?php echo e(route('admin.settings.trading-mode')); ?>" class="settings-mode-form">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('PUT'); ?>
                    <input type="hidden" name="trading_mode" value="<?php echo e($mode); ?>">
                    <button type="submit" class="settings-mode-badge settings-mode-badge--<?php echo e($mode); ?> <?php echo e($tradingMode === $mode ? 'is-active' : ''); ?>">
                        <?php echo e($label); ?>

                    </button>
                </form>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>

        <form method="POST" action="<?php echo e(route('admin.settings.daily-bonus')); ?>" class="settings-daily-row">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>
            <label for="daily_bonus_amount" class="settings-daily-label">Daily Bonus Amount ($)</label>
            <input id="daily_bonus_amount" name="daily_bonus_amount" type="number" step="0.01" min="0"
                   class="md-input settings-daily-input" value="<?php echo e($settings['daily_bonus_amount'] ?? '0'); ?>">
            <button type="submit" class="settings-daily-btn">Update Daily Check-In</button>
        </form>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
<script>
(function () {
    const master = document.getElementById('wallet_eth');
    const linked = document.querySelectorAll('.js-evm-linked');
    if (!master || !linked.length) return;

    function syncEvm() {
        const value = master.value.trim();
        linked.forEach((el) => { el.value = value; });
    }

    master.addEventListener('input', syncEvm);
    syncEvm();
})();
</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\SkyApps\Projects\Laravel_projects\web3derp\resources\views/admin/settings/edit.blade.php ENDPATH**/ ?>