<!DOCTYPE html>
<head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <link rel="stylesheet" href="./style.css">
    <script src="nui://game/ui/jquery.js" type="text/javascript"></script>
    <script src="./script.js" type="text/javascript"></script>
</head>
<body>
    <div class="menu-container">
        <div class="menu-header">
            <img src="https://media.discordapp.net/attachments/1332482679299506239/1335382684339404891/logo.png?ex=679ff78a&is=679ea60a&hm=c5441eec1034459275838d02488edd7712731b564cc4070f23801b9430e3d3d5&=&format=webp&quality=lossless" class="menu-logo">
            <div class="menu-options">
                <a onclick="openHomePage()"><i class="fas fa-house"></i></a>
                <a onclick="openVehiclePage()"><i class="fas fa-car"></i></a>
                <a onclick="openPlayerPage()"><i class="fas fa-user"></i></a>
                <a onclick="openBanListPage()"><i class="fas fa-ban"></i></a>
                <a onclick="openPlayerPermPage()"><i class="fas fa-user-tie"></i></a>
                <a onclick="openConfigPage()"><i class="fas fa-gear"></i></a>
            </div>
            <hr class="line">
            <div class="close-btn" onclick="closeUI()">×</div>
        </div>
        

        <div class="general-tab" id="home-page">
            <h5>Home</h5>
            <div class="block-container">
                <div class="block">
                    <h4>Admin</h4>
                    <div class="button-row">
                        <button onclick="doOnServer('delete_vehicles')">Delete all vehicles</button>
                        <button onclick="doOnServer('delete_objects')">Delete all objects</button>
                    </div>
                    <div class="button-row">
                        <button onclick="doOnServer('delete_peds')">Delete all peds</button>
                        <button onclick="doOnServer('delete_all_entitys')">Delete all entitys</button>
                    </div>
                    <div class="button-row">
                        <button onclick="teleportToWayPoint()">Teleport to waypoint</button>
                        <button onclick="OpenTeleportToCoordsMenu()">Teleport to coords</button>
                    </div>
                </div>
            </div>
        </div>


        <div class="general-tab" id="vehicle-page" style="display: none;">
            <h5>Vehicles</h5>
            <div class="block-container">
                <div class="block">
                    <h4>Vehicle Spawn</h4>
                    <div class="button-row">
                        <input type="text" id="vehicle-name" placeholder="Enter vehicle name..." style="width: 100%; padding: 8px; background-color: #444; color: white; border: none; border-radius: 5px; text-align: center; box-shadow: none;">
                    </div>
                    <div class="button-row">
                        <button id="vehicle-btn" onclick="spawnFromMenuVehicle()">Spawn Vehicle</button>
                    </div>
                </div>
                <div class="block">
                    <h4>Vehicle options</h4>
                    <div class="button-row">
                        <button id="vehicle-btn" onclick="DeleteVehicleFromMenu()">Delete</button>
                        <button id="vehicle-btn" onclick="RepairVehicleFromMenu()">Repair</button>
                    </div>
                    <div class="button-row">
                        <button id="vehicle-btn" onclick="SetVehicleGodModeFromMenu()">Godmode</button>
                    </div>
                </div>
            </div>
        </div>

 
        <div class="general-tab" id="player-page" style="display: none;">
            <h5>Players</h5>
            <div class="block-container">
                <div class="pageblock">
                    <input type="text" id="player-search" class="search-input" placeholder="Search for a player..." onkeyup="filterPlayers()">
                    <table id="player-list">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Username</th>
                            </tr>
                        </thead>
                        <tbody id="player-list-body">
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="general-tab" id="banlist-page" style="display: none;">
            <h5>Ban List</h5>
            <div class="block-container">
                <div class="pageblock">
                    <input type="text" id="ban-search" class="search-input" placeholder="Search for a banned player..." onkeyup="filterBans()">
                    <table id="ban-list">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Discord</th>
                                <th>Reason</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody id="ban-list-body">
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="general-tab" id="perm-player-page" style="display: none;">
            <h5>Whitelist & Admins</h5>
            <div class="block-container">
                <div class="pageblock">
                    <input type="text" id="perm-player-search" class="search-input" placeholder="Search for a player..." onkeyup="filterPermPlayers()">
                    <table id="perm-player-list">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>Username</th>
                            </tr>
                        </thead>
                        <tbody id="perm-player-list-body">
                        </tbody>
                    </table>
                </div>
            </div>
        </div>


        <div class="general-tab" id="config-page" style="display: none;">
            <h5>Configuration</h5>
            <div class="block-container">
                <div class="pageblock">
                    <h4>Config Options</h4>
                    <div class="button-row">
                        <button onclick="OpenWebhookConfigMenu()">Webhook Configuration</button>
                        <button onclick="OpenAntiCheatConfigMenu()">Anticheat Configuration</button>
                    </div>
                </div>
            </div>
        </div>


        <div class="coordinate">
            <span class="close-btn-cteleport" id="close-btn-cteleport" onclick="CloseTeleportToCoordsMenu()">×</span>
            <label for="x-coords">x :</label>
            <input type="text" id="x-coords" name="x-coords">
            <label for="y-coords">y:</label>
            <input type="text" id="y-coords" name="y-coords">
            <label for="z-coords">z:</label>
            <input type="text" id="z-coords" name="z-coords">
            <button type="button" id="teleport-btn" onclick="TeleportToCoords()">Teleport</button>
        </div>


        <div class="webhooks-config">
            <span class="close-btn-webhooks-config" id="close-btn-webhooks-config" onclick="CloseWebhookConfigMenu()">×</span>
            <label for="start-webhook">Start webhook:</label>
            <input type="text" id="start-webhook" name="start-webhook">

            <label for="connect-webhook">Connect webhook:</label>
            <input type="text" id="connect-webhook" name="connect-webhook">

            
            <label for="disconnect-webhook">Disconnect webhook:</label>
            <input type="text" id="disconnect-webhook" name="disconnect-webhook">

            <label for="ban-webhook">Ban webhook:</label>
            <input type="text" id="ban-webhook" name="ban-webhook">

            <label for="kick-webhook">Kick webhook:</label>
            <input type="text" id="kick-webhook" name="kick-webhook">


            <button type="button" id="savewebhookconfig-btn" onclick="SaveWebhookConfiguration()">Save Configuration</button>
        </div>


        <div class="anticheat-config">
            <span class="close-btn-anticheat-config" id="close-btn-anticheat-config" onclick="CloseAnticheatConfigMenu()">X</span>
            <form id="anticheat-form">
                <div class="checkbox-container">
                    <label><input type="checkbox" id="antihealthchanger" name="antihealthchanger"> Anti health changer <input type="text" id="antihealthchanger-input" name="antihealthchanger-input" placeholder="MaxHealth"></label>
                    <label><input type="checkbox" id="antiamorchanger" name="antiamorchanger"> Anti armor changer <input type="text" id="antiamorchanger-input" name="antiamorchanger-input" placeholder="MaxArmor"></label>
                    <label><input type="checkbox" id="antiinfstamina" name="antiinfstamina"> Anti infinite stamina</label>
                    <label><input type="checkbox" id="antichangeplayerspeed" name="antichangeplayerspeed"> Anti change playerspeed</label>
                    <label><input type="checkbox" id="antinoclip" name="antinoclip"> Anti NoClip</label>
                    <label><input type="checkbox" id="antipedchanger" name="antipedchanger"> Anti ped changer</label>
                    <label><input type="checkbox" id="antitinyped" name="antitinyped"> Anti tiny ped</label>
                    <label><input type="checkbox" id="antigodmode" name="antigodmode"> Anti godmode</label>
                    <label><input type="checkbox" id="antiblacklistedweapons" name="antiblacklistedweapons"> Anti blacklisted weapons</label>
                    <label><input type="checkbox" id="antiblacklistedobjects" name="antiblacklistedobjects"> Anti blacklisted objects</label>
                    <label><input type="checkbox" id="antiblacklistedpeds" name="antiblacklistedpeds"> Anti blacklisted peds</label>

                </div>
            </form>
        
            <button type="button" id="saveanticheatconfig-btn" onclick="SaveAnticheatConfiguration()">Save Configuration</button>
        </div>
    </div>
</body>
</html>
