<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

$static_url = dirname($_SERVER['SCRIPT_NAME']) . '/assets/';
$current_page = basename($_SERVER['PHP_SELF']);
?>

<div id="kt_app_sidebar" class="app-sidebar" data-kt-drawer="true" data-kt-drawer-name="app-sidebar"
    data-kt-drawer-activate="{default: true, lg: false}" data-kt-drawer-overlay="true" data-kt-drawer-width="250px"
    data-kt-drawer-direction="start" data-kt-drawer-toggle="#kt_app_sidebar_toggle">
    <div class="d-none d-lg-flex flex-center px-6 pt-10 pb-10" id="kt_app_sidebar_header">
        <a href="dashbord.php">
            <img alt="Logo" src="<?php echo $static_url; ?>media/logos/logo.png" class=" h-50px" />
        </a>
    </div>
    <div class="flex-grow-1">
        <div id="kt_app_sidebar_menu_wrapper" class="hover-scroll-y" data-kt-scroll="true" data-kt-scroll-height="auto"
            data-kt-scroll-dependencies="#kt_app_sidebar_header, #kt_app_sidebar_footer" data-kt-scroll-offset="20px">
            <div class="app-sidebar-navs-default px-5 mb-10">
                <div id="#kt_app_sidebar_menu" data-kt-menu="true" data-kt-menu-expand="false"
                    class="menu menu-column menu-rounded menu-sub-indention">
                    <div class="menu-item pb-0 pt-0">
                        <div class="menu-content">
                            <span class="menu-heading">Pannello di controllo</span>
                        </div>
                    </div>
                    <div class="separator mb-4 mx-4"></div>
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'dashbord.php') ? 'active' : ''; ?>" href="dashbord.php">
                           <span class="menu-title">🧩Aggiungi applicazione</span>
                        </a>
                    </div>
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'mac.php') ? 'active' : ''; ?>" href="mac.php">
                             <span class="menu-title">🔑 Attivazioni utente</span>
                        </a>
                    </div>
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'mac_message.php') ? 'active' : ''; ?>" href="mac_message.php">
                            <span class="menu-title">🙋 Visualizza utenti online</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'chatbot') ? 'active' : ''; ?>" href="chatbot.php">
                            <span class="menu-title">🤖 Test automatico</span>
                        </a>
                    </div>
                    
                     <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'whatsapp') ? 'active' : ''; ?>" href="whatsapp.php">
                            <span class="menu-title">📞 Settore delle Riscossioni </span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'note.php') ? 'active' : ''; ?>" href="note.php">
                            <span class="menu-title">🖼️ Carica il tuo logo</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'bg.php') ? 'active' : ''; ?>" href="bg.php">
                            <span class="menu-title">📢 Invia il tuo annuncio</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'tmdb.php') ? 'active' : ''; ?>" href="tmdb.php">
                            <span class="menu-title">🔄 Modalità annunci</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'mensagem.php') ? 'active' : ''; ?>" href="mensagem.php">
                            <span class="menu-title">🔔 Notifica agli utenti</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'reports.php') ? 'active' : ''; ?>" href="reports.php">
                            <span class="menu-title">📨 Feedback degli utenti</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'configsport.php') ? 'active' : ''; ?>" href="configsport.php">
                            <span class="menu-title">⚽️ Il tuo collegamento sportivo</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'remover.php') ? 'active' : ''; ?>" href="remover.php">
                            <span class="menu-title">🚫 Rimuovi applicazioni</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'agenda.php') ? 'active' : ''; ?>" href="agenda.php">
                             <span class="menu-title">⏰  Tempo di disinstallazione</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'menu.php') ? 'active' : ''; ?>" href="menu.php">
                              <span class="menu-title">🏠 Abilita/Disabilita (Menu)</span>
                        </a>
                    </div>
                    
                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'bloquear.php') ? 'active' : ''; ?>" href="bloquear.php">
                              <span class="menu-title">🔒 Impostazioni di blocco</span>
                        </a>
                    </div>

                    <div class="menu-item">
                        <a class="menu-link <?php echo ($current_page == 'users.php') ? 'active' : ''; ?>" href="users.php">
                            <span class="menu-title">🙍 Il mio profilo</span>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="d-flex flex-stack px-10 px-lg-15 pb-8" id="kt_app_sidebar_footer">
        <span class="d-flex flex-center gap-1 text-white theme-light-show fs-5 px-0">
            <i class="ki-outline ki-night-day text-gray-500 fs-2"></i>Modalità scura</span>
        <span class="d-flex flex-center gap-1 text-white theme-dark-show fs-5 px-0">
            <i class="ki-outline ki-moon text-gray-500 fs-2"></i>Modalità luce</span>
        <div data-bs-theme="dark">
            <div class="form-check form-switch form-check-custom form-check-solid">
                <input class="form-check-input h-25px w-45px" type="checkbox" value="1"
                    id="kt_sidebar_theme_mode_toggle" />
            </div>
        </div>
    </div>
</div>