<?php


$user = $_SESSION['user'];

?>

<nav class="navbar navbar-expand-lg bg-bsi" data-bs-theme="dark">
  <div class="container-fluid">
    <a class="navbar-brand" href="/admin/dashboard">
      <span class="navbar-brand mb-0 d-flex gap-2 align-items-center">
        <span><i class="bi bi-headset me-2"></i> IT Helpdesk </span>
        <span>|</span>
        <small>Bank Syariah Indonesia</small>
      </span>
    </a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="d-flex" id="navbarSupportedContent">
      <ul class="navbar-nav">
        <li class="nav-item">
          <a class="nav-link" href="<?= url('LOGOUT') ?>">
            <i class="bi bi-power"></i>
            Logout
          </a>
        </li>
        <span class="navbar-text mx-2">
          |
        </span>
        <li class="nav-item">
          <span class="navbar-text me-2">
            Assalamu'alaikum, <?= $user['nama'] ?>
          </span>
          <a class="navbar-brand" href="#">
            <img src="<?= asset("/images/avatars/user.png"); ?>"
              alt="Logo" width="40" height="40"
              class="d-inline-block align-text-center rounded-circle">
          </a>
        </li>
      </ul>
    </div>
  </div>
</nav>