<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>URL dan Bug Generator</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="container">
        <h1>URL dan Bug Generator</h1>
        <div class="input-section">
            <label for="inputUrl">Input URL Akun Dibawah Ini:</label>
            <textarea id="inputUrl" role="textbox" placeholder="Masukan Link Akun Server"></textarea>
        </div>
        <div class="input-section">
            <label for="inputBug1">Input Beberapa Bug Untuk (Mode SNI / Wildcard dibagian server):</label>
            <textarea id="inputBug1" role="textbox" placeholder="Masukan minimal 1 bug.."></textarea>
        </div>
        <div class="input-section">
            <label for="inputBug2">Input Beberapa Bug Untuk (Mode CDN):</label>
            <textarea id="inputBug2" role="textbox" placeholder="Masukan minimal 1 bug.."></textarea>
        </div>
        <p><strong>Costum Proxy Provider</strong></p><br>
        <button class="toggle-button" onclick="toggleHostname()">Show Hostname Fields</button>
        <button class="toggle-button" onclick="togglePathHost()">Show Path Host Fields</button>
        <div id="hostnameFields" style="display: none;">
            <div class="input-section">
                <label for="hostname1">Hostname 1:</label>
                <input type="text" id="hostname1" placeholder="Masukan Wildcard..">
            </div>
            <div class="input-section">
                <label for="hostname2">Hostname 2:</label>
                <input type="text" id="hostname2" placeholder="Masukan Wildcard..">
            </div>
        </div>
        <div id="pathHostFields" style="display: none;">
            <div class="input-section">
                <label for="pathhost">Path Host:</label>
                <input type="text" id="pathhost" placeholder="Masukan Path Host">
            </div>
        </div>
        <button class="generate-button" onclick="aksi()">Generate</button>
        <div id="loader" class="loader" style="display: none;"></div>
        <div class="output-section">
            <label>Informasi Akun:</label>
            <table id="outputResult" class="output-table">
            </table>
        </div>
        <div id="details"></div>
    </div>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="script.js"></script>
    <script src="trojan.js"></script>
    <script src="vmess.js"></script>
    <script src="vless.js"></script>
    <script>
        function toggleHostname() {
            var hostnameFields = document.getElementById('hostnameFields');
            var toggleButton = document.querySelector('.toggle-button');
            if (hostnameFields.style.display === 'none') {
                hostnameFields.style.display = 'block';
                toggleButton.textContent = 'Hide Hostname Fields';
            } else {
                hostnameFields.style.display = 'none';
                toggleButton.textContent = 'Show Hostname Fields';
            }
        }

        function togglePathHost() {
            var pathHostFields = document.getElementById('pathHostFields');
            var toggleButtons = document.querySelectorAll('.toggle-button')[1];
            if (pathHostFields.style.display === 'none') {
                pathHostFields.style.display = 'block';
                toggleButtons.textContent = 'Hide Path Host Fields';
            } else {
                pathHostFields.style.display = 'none';
                toggleButtons.textContent = 'Show Path Host Fields';
            }
        }
    </script>
</body>
</html>
