<!DOCTYPE html>
<html lang="HTML-5">
    <head>
        <title>VR Contact</title>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="CSS/style.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <nav id="navigation">
        <div class="link-container">
            <div id="logo" ><a class="link-logo" href="#"></a></div>
            <button id="nav-toggle-btn" aria-label="Menü ein-/ausklappen">&#9660;</button>
            <div class="nav-links">
                <?php if (isset($_SESSION['user'])): ?>
                    <a id="link-tickets" class="links" href="?controller=Event&do=showEvents">Event</a>
                    <a id="link-infos" class="links" href="?controller=News&do=showNews">Infos</a>
                    <a id="link-profil" class="links" href="?controller=Profile&do=showProfile">Profil</a>
                    <?php if (isset($_SESSION['is_admin']) && $_SESSION['is_admin']): ?>
                        <a id="link-gutscheinverwaltung" class="links" href="?controller=Gutschein&do=adminVerwaltung">Gutscheine</a>
                    <?php endif; ?>
                    <a id="link-logout" class="links" href="?controller=Auth&do=logout">Logout</a>
                <?php else: ?>
                    <a id="link-login" class="links" href="?controller=Auth&do=showLoginForm">Login</a>
                    <a id="link-register" class="links" href="?controller=Auth&do=showRegistrationForm">Register</a>
                <?php endif; ?>
                <div id="profile-picture"></div>
            </div>
        </div>
    </nav>
    <script>
    document.addEventListener('DOMContentLoaded', function() {
        var btn = document.getElementById('nav-toggle-btn');
        var links = document.querySelector('.nav-links');
        if (btn && links) {
            btn.addEventListener('click', function() {
                links.classList.toggle('open');
                btn.classList.toggle('open');
                btn.innerHTML = links.classList.contains('open') ? '&#9650;' : '&#9660;';
            });
        }
    });
    </script>
