{{define "tabler_navbar"}}
<header class="navbar navbar-expand-md d-print-none">
  <div class="container-xl">
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>
    {{template "tabler_navbar_logo" .}}

    {{if .NavbarMenu}}
    <div class="collapse navbar-collapse" id="navbar-menu">
      {{template "tabler_navbar_menu" .}}
    </div>
    {{end}}

    <div class="navbar-nav flex-row order-md-last">
      <div class="nav-item dropdown">
        <a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown">
          <span class="avatar avatar-sm" style="background-image: url(/static/avatars/000m.jpg)"></span>
          <div class="d-none d-xl-block ps-2">
            <div>{{.UserName}}</div>
            <div class="mt-1 small text-secondary">{{.UserRole}}</div>
          </div>
        </a>
      </div>
    </div>
  </div>
</header>
{{end}}
