<?php $user_role = isset($_SESSION['role']) ? $_SESSION['role'] : 'staff'; ?>
<nav class="bottom-nav">
    <?php if ($user_role === 'admin'): ?>
    <a href="/cash_lending/mobile/dashboard.php" class="nav-item <?php echo ($active_nav??'')==='dashboard' ?'active':''; ?>">
        <i class="fas fa-chart-line"></i><span>Dashboard</span>
    </a>
    <?php endif; ?>

    <a href="/cash_lending/mobile/borrowers.php" class="nav-item <?php echo ($active_nav??'')==='borrowers' ?'active':''; ?>">
        <i class="fas fa-users"></i><span>Borrowers</span>
    </a>

    <a href="/cash_lending/mobile/loans.php" class="nav-item <?php echo ($active_nav??'')==='loans' ?'active':''; ?>">
        <i class="fas fa-file-contract"></i><span>Loans</span>
    </a>

    <?php if ($user_role === 'admin'): ?>
    <a href="/cash_lending/mobile/payments.php" class="nav-item <?php echo ($active_nav??'')==='payments' ?'active':''; ?>">
        <i class="fas fa-credit-card"></i><span>Payments</span>
    </a>
    <?php endif; ?>

    <a href="/cash_lending/mobile/profile.php" class="nav-item <?php echo ($active_nav??'')==='profile' ?'active':''; ?>">
        <i class="fas fa-user"></i><span>Profile</span>
    </a>
</nav>
