<nav class="navbar navbar-expand-lg bg-navbar">
<div class="container">
<a class="navbar-brand" href="{{ path('home_index') }}">3D.KRO</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="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto d-flex align-items-center">
<li class="nav-item">
<a class="nav-link mx-4{% if app.request.get('_route') == 'product_index' %} active"{% endif %}" href="{{ path('product_index') }}"><i class="bi bi-box-seam"></i> Produits</a>
</li>
<li class="nav-item">
<a class="nav-link mx-4{% if app.request.get('_route') == 'home_gallery' %} active"{% endif %}" href="{{ path('home_gallery') }}"><i class="bi bi-camera"></i> Galerie</a>
</li>
<li class="nav-item">
<a class="nav-link mx-4{% if app.request.get('_route') == 'contact_index' %} active"{% endif %}" href="{{ path('contact_index') }}"><i class="bi bi-chat-right-dots"></i> Contact</a>
</li>
</ul>
<ul class="navbar-nav d-flex align-items-center">
{% if app.user %}
<li class="nav-item">
<a class="nav-link mx-4{% if app.request.get('_route') == 'product_cart' %} active"{% endif %}" href="{{ path('product_cart') }}"><i class="bi bi-cart3"></i> Panier ({{ countCart() }})</a>
</li>
{% endif %}
{% if is_granted('ROLE_ADMIN') %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bi bi-sliders"></i> Administration
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item{% if app.request.get('_route') == 'management_index' %} active"{% endif %}" href="{{ path('management_index') }}">Produits</a>
<a class="dropdown-item{% if app.request.get('_route') == 'gallery_index' %} active"{% endif %}" href="{{ path('gallery_index') }}">Galerie</a>
<a class="dropdown-item{% if app.request.get('_route') == 'order_index' %} active"{% endif %}" href="{{ path('order_index') }}">Commandes</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item{% if app.request.get('_route') == 'conversation_index' %} active"{% endif %}" href="{{ path('conversation_index') }}">Messagerie</a>
</div>
</li>
{% endif %}
{% if app.user %}
<li class="nav-item">
<a class="btn btn-navbar-login my-2" href="{{ path('security_logout') }}">Déconnexion</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link mx-4{% if app.request.get('_route') == 'security_register' %} active"{% endif %}"" href="{{ path('security_register') }}">S'inscrire</a>
</li>
<li class="nav-item">
<a class="btn btn-navbar-login my-2" href="{{ path('security_login') }}">Connexion</a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>