<nav class="main-header navbar navbar-expand navbar-white navbar-light">
<!-- Left navbar links (for sidebar toggle) -->
<ul class="navbar-nav">
    <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
    </li>
</ul>

<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
    <!-- Profile Dropdown Menu -->
    <li class="nav-item dropdown">
        <a class="nav-link" data-toggle="dropdown" href="#">
            <i class="fas fa-user"></i>
            <span class="ml-2">Profil</span>
        </a>
        <?php if (session()->get('role') === 'super admin'): ?>
        <div class="dropdown-menu dropdown-menu-right">
            <a href="<?= base_url('edit-profil') ?>" class="dropdown-item">
                <i class="fas fa-edit"></i> Edit Profil
            </a>
        <?php elseif (session()->get('role') === 'petugas'): ?>
            <div class="dropdown-menu dropdown-menu-right">
            <a href="<?= base_url('petugas/edit-profil') ?>" class="dropdown-item">
                <i class="fas fa-edit"></i> Edit Profil
            </a>
        <?php endif; ?>
            <div class="dropdown-divider"></div>
            <a href="<?= base_url('logout') ?>" class="dropdown-item">
                <i class="fas fa-sign-out-alt"></i> Logout
            </a>
        </div>
    </li>
</ul>
</nav>