<header id="page-topbar" class="layout-width navbar-header navbar-brand-box d-flex topbar-menu">
{# logo #}
<div class="header-logo">
{# <button type="button" class="btn btn-sm px-3 fs-16 header-item vertical-menu-btn topnav-hamburger" id="topnav-hamburger-icon">#}
{# <span class="hamburger-icon">#}
{# <span></span>#}
{# <span></span>#}
{# <span></span>#}
{# </span>#}
{# </button>#}
<a href="/" class="logo logo-light">
<span class="logo-sm">
<img src="{{ asset('images/logo-sisat.png') }}" alt="" height="25">
</span>
<span class="logo-lg">
<img src="{{ asset('images/logo-sisat.png') }}" alt="" height="35">
</span>
</a>
</div>
<div class="d-flex align-items-center">
<div class="ms-1 header-item d-none d-sm-flex">
<a href="/">
<button type="button"
class="btn btn-icon btn-topbar btn-ghost-secondary rounded-circle"
title="accueil">
<i class="mdi mdi-home" style="font-size: 1.5em;"></i>
</button>
</a>
</div>
<div class="ms-1 header-item d-none d-sm-flex">
<a href="#">Qui sommes nous</a>
</div>
{# Utilisateur non connecté #}
{% if not app.user %}
<div class="dropdown ms-sm-3 header-item topbar-user">
<button type="button" class="btn" id="page-header-user-dropdown" data-bs-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="d-flex align-items-center">
<img class="rounded-circle header-profile-user"
src="{{ asset('images/users/user-dummy-img.jpg') }}"
alt="icône d'utilisateur non connecté">
<span class="text-start ms-xl-2">
<span class="d-none d-xl-inline-block ms-1 fw-medium user-name-text">Connexion</span>
</span>
</span>
</button>
<div class="dropdown-menu dropdown-menu-end">
<h6 class="dropdown-header">Bienvenue</h6>
<a class="dropdown-item" href="{{ path('app_login') }}">
<i class="mdi mdi-connection text-muted fs-16 align-middle me-1"></i>
<span class="align-middle">Se connecter</span>
</a>
<a class="dropdown-item" href="{{ path('app_register') }}">
<i class="mdi mdi-account-plus text-muted fs-16 align-middle me-1"></i>
<span class="align-middle">S'inscrire</span>
</a>
</div>
</div>
{# Utilisateur connecté #}
{% else %}
<div class="dropdown ms-sm-3 header-item topbar-user">
<button type="button" class="btn" id="page-header-user-dropdown" data-bs-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="d-flex align-items-center">
<img class="rounded-circle header-profile-user" src="{{ asset('images/users/user-dummy-img.jpg') }}"
alt="icône d'utilisateur non connecté">
<span class="text-start ms-xl-2">
<span class="d-none d-xl-inline-block ms-1 fw-medium user-name-text">{{app.user.nom}}</span>
</span>
</span>
</button>
<div class="dropdown-menu user-drop dropdown-menu-end">
<!-- item-->
<h6 class="dropdown-header">{{ app.user.prenom }} {{ app.user.nom }}</h6>
{% if app.user.typeAdherent.niveau ==1 %}
<a class="dropdown-item" href="{{ path('admin') }}">
<i class="mdi mdi-shield-lock-outline text-muted fs-16 align-middle me-1"></i>
Administration
</a>
{% endif %}
<a class="dropdown-item" href="{{ path('user_details', {'id': app.user.id }) }}">
<i class="mdi mdi-cog-outline text-muted fs-16 align-middle me-1"></i>
<span class="align-middle">Profil</span>
</a>
<a class="dropdown-item" href="{{ path('app_logout') }}">
<i class="mdi mdi-logout text-muted fs-16 align-middle me-1"></i>
<span class="align-middle" data-key="t-logout">Déconnexion</span>
</a>
</div>
</div>
{% endif %}
</div>
</header>