<nav class="navbar fixed-top navbar-expand-lg bg-body-tertiary">
  <div class="container">
    <a class="navbar-brand" href="{{ path('dashboard') }}">
      <img src="/images/logo.png" width="30" height="30" alt=""> Davis
    </a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="{{ "toggle.navigation"|trans }}">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav me-auto">
        <li class="nav-item{% if menu == "dashboard" %} active{% endif %}">
          <a class="nav-link" href="{{ path('dashboard') }}">{{ "title.dashboard"|trans }}</a>
        </li>
        <li class="nav-item{% if menu == "resources" %} active{% endif %}">
          <a class="nav-link" href="{{ path('user_index') }}">{{ "title.users_and_resources"|trans }}</a>
        </li>
      </ul>
      {% if app.user %}
      <ul class="navbar-nav">
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="navUserMenu" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            👤 {{ app.user.username }}
          </a>
          <div class="dropdown-menu" aria-labelledby="navUserMenu">
            <a class="dropdown-item" href="{{ path('app_logout') }}">{{ "logout"|trans }}</a>
          </div>
        </li>
        <li class="nav-item dropdown">
          <button class="nav-link py-2 px-0 px-lg-2 dropdown-toggle d-flex align-items-center" id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" aria-label="{{ "toggle.theme"|trans }}">
            <span class="theme-icon-active me-1">☀️</span> <span class="d-lg-none ms-2" id="bd-theme-text">{{ "toggle.theme"|trans }}</span>
          </button>
          <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme-text" data-bs-popper="static">
            <li>
              <button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="true">
                <span class="theme-icon me-2">☀️</span> {{ "theme.light"|trans }}
              </button>
            </li>
            <li>
              <button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="dark" aria-pressed="false">
                <span class="theme-icon me-2">🌙</span> {{ "theme.dark"|trans }}
              </button>
            </li>
            <li>
              <button type="button" class="dropdown-item d-flex align-items-center" data-bs-theme-value="auto" aria-pressed="false">
                <span class="theme-icon me-2">🔘</span> {{ "theme.auto"|trans }}
              </button>
            </li>
          </ul>
        </li>
      </ul>
      {% endif %}
    </div>
  </div>
</nav>