<?php
// This file must not have any output before the PHP opening tag to avoid header errors.
?>
<div class="admin-layout">
    <!-- Sidebar -->
    <nav class="sidebar">
        <div class="sidebar-sticky">
            <ul class="nav flex-column">
                <li class="nav-item">
                    <a class="nav-link <?php echo ($currentPage === 'dashboard') ? 'active' : ''; ?>" href="dashboard.php">
                        <i class="fas fa-tachometer-alt mr-2"></i>
                        Dashboard
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link <?php echo ($currentPage === 'visitors') ? 'active' : ''; ?>" href="visitors.php">
                        <i class="fas fa-users mr-2"></i>
                        Visitors
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link <?php echo ($currentPage === 'products') ? 'active' : ''; ?>" href="products.php">
                        <i class="fas fa-box mr-2"></i>
                        Products
                    </a>
                </li>
        <li class="nav-item">
            <a class="nav-link <?php echo ($currentPage === 'leads') ? 'active' : ''; ?>" href="leads.php">
                <i class="fas fa-user-plus mr-2"></i>
                Leads
            </a>
        </li>
        <li class="nav-item">
            <a class="nav-link <?php echo ($currentPage === 'visitor_targeting') ? 'active' : ''; ?>" href="visitor_targeting.php">
                <i class="fas fa-bullseye mr-2"></i>
                Visitor Targeting
            </a>
        </li>
                <li class="nav-item">
                    <a class="nav-link <?php echo ($currentPage === 'telegram') ? 'active' : ''; ?>" href="telegram.php">
                        <i class="fab fa-telegram mr-2"></i>
                        Telegram Bot
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link <?php echo ($currentPage === 'settings') ? 'active' : ''; ?>" href="settings.php">
                        <i class="fas fa-cog mr-2"></i>
                        Settings
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link <?php echo ($currentPage === 'telegram_test') ? 'active' : ''; ?>" href="test_telegram.php">
                        <i class="fas fa-robot mr-2"></i>
                        Test Telegram
                    </a>
                </li>
            </ul>
        </div>
    </nav>

    <!-- Main content -->
    <main role="main" class="main-content">
