<?php
/**
 * Student Dashboard Navigation Component
 */

$currentTab = $currentTab ?? 'dashboard';
$studentName = $_SESSION['full_name'] ?? 'Pelajar';
$studentEmoji = $_SESSION['profile_emoji'] ?? '👨‍🎓';
?>
<aside class="sidebar">
    <div class="sidebar-header">
        <div class="sidebar-logo">📚</div>
        <h2 class="sidebar-title">TutorKita</h2>
        <p class="sidebar-subtitle">Panel Pelajar</p>
    </div>
    
    <nav class="sidebar-nav">
        <a href="#" class="nav-item <?php echo $currentTab === 'dashboard' ? 'active' : ''; ?>" onclick="switchTab('dashboard'); return false;">
            <span class="nav-icon">🏠</span> Dashboard
        </a>
        <a href="#" class="nav-item <?php echo $currentTab === 'schedule' ? 'active' : ''; ?>" onclick="switchTab('schedule'); return false;">
            <span class="nav-icon">📅</span> Jadual Waktu
        </a>
        <a href="#" class="nav-item <?php echo $currentTab === 'modules' ? 'active' : ''; ?>" onclick="switchTab('modules'); return false;">
            <span class="nav-icon">📚</span> Modul Saya
        </a>
        <a href="#" class="nav-item <?php echo $currentTab === 'classes' ? 'active' : ''; ?>" onclick="switchTab('classes'); return false;">
            <span class="nav-icon">🏫</span> Kelas Saya
        </a>
        <a href="#" class="nav-item <?php echo $currentTab === 'forum' ? 'active' : ''; ?>" onclick="switchTab('forum'); return false;">
            <span class="nav-icon">💬</span> Forum
        </a>
        <a href="#" class="nav-item <?php echo $currentTab === 'profile' ? 'active' : ''; ?>" onclick="switchTab('profile'); return false;">
            <span class="nav-icon">👤</span> Profil Saya
        </a>
    </nav>
    
    <div style="padding: 20px; margin-top: auto;">
        <button class="btn btn-secondary" style="width: 100%;" onclick="logout()">
            <span>🚪</span> Log Keluar
        </button>
    </div>
</aside>

