<?php
// Helper: generate admin sidebar nav HTML
function adminNav(): string {
    $u = fn(string $p) => \Core\View::url($p);
    return '
    <div class="nav-section">Main</div>
    <div class="nav-item"><a href="'.$u('admin/dashboard').'"><i class="bi bi-grid"></i> Dashboard</a></div>
    <div class="nav-item"><a href="'.$u('admin/analytics').'"><i class="bi bi-graph-up-arrow"></i> Analytics Engine</a></div>
    <div class="nav-section">CBC/CBE</div>
    <div class="nav-item"><a href="'.$u('admin/students').'"><i class="bi bi-people"></i> Learners</a></div>
    <div class="nav-item"><a href="'.$u('admin/teachers').'"><i class="bi bi-person-badge"></i> Teachers</a></div>
    <div class="nav-item"><a href="'.$u('admin/exams').'"><i class="bi bi-journal-text"></i> Assessments</a></div>
    <div class="nav-item"><a href="'.$u('admin/competency').'"><i class="bi bi-stars"></i> Competencies</a></div>
    <div class="nav-item"><a href="'.$u('admin/attendance').'"><i class="bi bi-calendar-check"></i> Attendance</a></div>
    <div class="nav-item"><a href="'.$u('admin/academic').'"><i class="bi bi-building"></i> Academic Setup</a></div>
    <div class="nav-section">Finance</div>
    <div class="nav-item"><a href="'.$u('admin/finance').'"><i class="bi bi-speedometer2"></i> Finance Dashboard</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/structure').'"><i class="bi bi-list-ul"></i> Fee Structure</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/invoices').'"><i class="bi bi-receipt"></i> Invoices & Payments</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/aging').'"><i class="bi bi-clock-history"></i> Aging / Debtors</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/expenses').'"><i class="bi bi-wallet2"></i> Expenses</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/scholarships').'"><i class="bi bi-award"></i> Scholarships</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/reports').'"><i class="bi bi-bar-chart"></i> Financial Reports</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/cashflow').'"><i class="bi bi-arrow-left-right"></i> Cash Flow</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/balancesheet').'"><i class="bi bi-journal-bookmark"></i> Balance Sheet</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/voteheads').'"><i class="bi bi-diagram-3"></i> Vote Heads</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/lpos').'"><i class="bi bi-file-earmark-text"></i> LPOs</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/cashbook').'"><i class="bi bi-journal-text"></i> Cashbook</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/accounts').'"><i class="bi bi-bank"></i> Cash Accounts</a></div>
    <div class="nav-section">Communication</div>
    <div class="nav-item"><a href="'.$u('admin/library').'"><i class="bi bi-book"></i> Library</a></div>
    <div class="nav-item"><a href="'.$u('admin/notifications').'"><i class="bi bi-bell"></i> Notifications</a></div>
    <div class="nav-section">System</div>
    <div class="nav-item"><a href="'.$u('admin/settings').'"><i class="bi bi-gear"></i> Settings</a></div>
    <div class="nav-item"><a href="'.$u('admin/users').'"><i class="bi bi-person-gear"></i> Users</a></div>
    <div class="nav-item"><a href="'.$u('admin/logs').'"><i class="bi bi-clock-history"></i> Activity Logs</a></div>
    <div class="nav-item"><a href="'.$u('profile').'"><i class="bi bi-person-circle"></i> My Profile</a></div>
    ';
}

function deputyNav(): string {
    $u = fn(string $p) => \Core\View::url($p);
    return '
    <div class="nav-section">Main</div>
    <div class="nav-item"><a href="'.$u('deputy/dashboard').'"><i class="bi bi-grid"></i> Dashboard</a></div>
    <div class="nav-item"><a href="'.$u('admin/analytics').'"><i class="bi bi-graph-up-arrow"></i> Analytics</a></div>
    <div class="nav-section">CBC/CBE</div>
    <div class="nav-item"><a href="'.$u('admin/students').'"><i class="bi bi-people"></i> Learners</a></div>
    <div class="nav-item"><a href="'.$u('admin/teachers').'"><i class="bi bi-person-badge"></i> Teachers</a></div>
    <div class="nav-item"><a href="'.$u('admin/exams').'"><i class="bi bi-journal-text"></i> Assessments</a></div>
    <div class="nav-item"><a href="'.$u('admin/competency').'"><i class="bi bi-stars"></i> Competencies</a></div>
    <div class="nav-item"><a href="'.$u('admin/attendance').'"><i class="bi bi-calendar-check"></i> Attendance</a></div>
    <div class="nav-item"><a href="'.$u('admin/academic').'"><i class="bi bi-building"></i> Academic Setup</a></div>
    <div class="nav-section">Finance (View Only)</div>
    <div class="nav-item"><a href="'.$u('admin/finance').'"><i class="bi bi-speedometer2"></i> Finance Overview</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/invoices').'"><i class="bi bi-receipt"></i> Invoices</a></div>
    <div class="nav-item"><a href="'.$u('admin/fees/reports').'"><i class="bi bi-bar-chart"></i> Reports</a></div>
    <div class="nav-section">Communication</div>
    <div class="nav-item"><a href="'.$u('admin/library').'"><i class="bi bi-book"></i> Library</a></div>
    <div class="nav-item"><a href="'.$u('admin/notifications').'"><i class="bi bi-bell"></i> Notifications</a></div>
    <div class="nav-item"><a href="'.$u('admin/sms').'"><i class="bi bi-chat-dots"></i> Send SMS</a></div>
    <div class="nav-section">Account</div>
    <div class="nav-item"><a href="'.$u('profile').'"><i class="bi bi-person-circle"></i> My Profile</a></div>
    ';
}

function librarianNav(): string {
    $u = fn(string $p) => \Core\View::url($p);
    return '
    <div class="nav-section">Library</div>
    <div class="nav-item"><a href="'.$u('librarian/dashboard').'"><i class="bi bi-grid"></i> Dashboard</a></div>
    <div class="nav-item"><a href="'.$u('admin/library').'"><i class="bi bi-book"></i> Book Catalogue</a></div>
    <div class="nav-item"><a href="'.$u('admin/library/borrowings').'"><i class="bi bi-arrow-left-right"></i> Borrowings</a></div>
    <div class="nav-section">Account</div>
    <div class="nav-item"><a href="'.$u('profile').'"><i class="bi bi-person-circle"></i> My Profile</a></div>
    ';
}
