

<!-- Sidebar -->
<ul class="navbar-nav bg-gradient-secondary sidebar sidebar-dark accordion" id="accordionSidebar">
    
    <!-- Sidebar - Brand -->
    <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ path('backend_admin_demo_index') }}">
        <div class="sidebar-brand-icon rotate-n-15">
            <i class="fas fa-laugh-wink"></i>
        </div>
        <div class="sidebar-brand-text mx-3">Promo<sup>TN</sup></div>
    </a>


    <!-- Divider -->
    <hr class="sidebar-divider my-0">
    <!-- Nav Item - Dashboard -->
    <li class="nav-item">
        <a class="nav-link" href="{{ path('frontend_home_index') }}">
            <i class="fa-solid fa-right-from-bracket"></i>
            <span>Retour au site</span>
        </a>
    </li>
    
    <!-- Divider -->
    <hr class="sidebar-divider">
    <!-- Heading -->
    <div class="sidebar-heading">Gestion</div>


    <!-- Nav Item - Charts -->
    <li class="nav-item {{ is_active(['backend_partner_dashboard_index']) }}">
        <a class="nav-link" href="{{ path('backend_partner_dashboard_index') }}">
            <i class="fas fa-fw fa-tachometer-alt"></i>
            <span>Dashboard</span>
        </a>
    </li>


    <!-- Nav Item - Charts -->
    <li class="nav-item ">
        <a class="nav-link" href="#">
            <i class="fa-solid fa-envelope"></i>
            <span>Message</span>
        </a>
    </li>

    <!-- Nav Item - Réservation -->
    {% set activeReservation = is_active(['backend_partner_reservation_liste_valider', 'backend_partner_reservation_valider', 'backend_partner_reservation_liste_encours']) %}
    {% if (activeReservation == 'active')  %} {% set showReservation = 'show' %} {% else %}  {% set showReservation = ''%} {% endif %}
    <li class="nav-item {{ activeReservation }}">
        <a class="nav-link collapsed" href="#collapsepartenariat" data-toggle="collapse" data-bs-toggle="collapse" aria-expanded="true" aria-controls="collapsepositions">
            <i class="fa-regular fa-building"></i>
            <span>Réservation</span>
        </a>
        <div id="collapsepartenariat" class="collapse {{ showReservation }}" data-parent="#accordionSidebar"aria-labelledby="headingpositions"  >
            <div class="bg-white py-2 collapse-inner rounded">
                <h6 class="collapse-header">Réservation:</h6>
                <a class="collapse-item {{ is_active(['backend_partner_reservation_valider']) }}" href="{{ path('backend_partner_reservation_valider') }}">Valider</a>
                <a class="collapse-item {{ is_active(['backend_partner_reservation_liste_valider']) }}" href="{{ path('backend_partner_reservation_liste_valider') }}">Liste Valider</a>
                <a class="collapse-item {{ is_active(['backend_partner_reservation_liste_encours']) }}" href="{{ path('backend_partner_reservation_liste_encours') }}">Liste En Cours</a>
            </div>
        </div>
    </li>



    <!-- Nav Item - Charts -->
    <li class="nav-item">
        <a class="nav-link" href="#">
            <i class="fa-solid fa-hand-holding-dollar"></i>
            <span>Réglement</span>
        </a>
    </li>

    <!-- Nav Item - Utilisateur -->
    {% set activeUtilisateur = is_active(['backend_partner_partenaire_add', 'backend_partner_partenaire_gestion']) %}
    {% if (activeUtilisateur == 'active')  %} {% set showUtilisateur = 'show' %} {% else %}  {% set showUtilisateur = ''%} {% endif %}
    <li class="nav-item {{ activeUtilisateur }}">
        <a class="nav-link collapsed" href="#collapseutilisateur" data-toggle="collapse" data-bs-toggle="collapse" aria-expanded="true" aria-controls="collapsepositions">
            <i class="fa-regular fa-building"></i>
            <span>Utilisateur</span>
        </a>
        <div id="collapseutilisateur" class="collapse {{ showUtilisateur }}" data-parent="#accordionSidebar"aria-labelledby="headingpositions"  >
            <div class="bg-white py-2 collapse-inner rounded">
                <h6 class="collapse-header">Utilisateur:</h6>
                <a class="collapse-item {{ is_active(['backend_partner_partenaire_gestion']) }}" href="{{ path('backend_partner_partenaire_gestion') }}">Gestion</a>
                <a class="collapse-item {{ is_active(['backend_partner_partenaire_add']) }}" href="{{ path('backend_partner_partenaire_add') }}">Ajouter</a>
            </div>
        </div>
    </li>


    <!-- Sidebar Message -->
    <hr class="sidebar-divider">
    <div class="sidebar-card d-none d-lg-flex">
        <img class="sidebar-card-illustration mb-2" src="{{ asset('images/backend/img/undraw_profile.svg') }}" alt="{{ app.user.firstname  ~  '  '  ~  app.user.lastname|e }}">
        <p class="text-center mb-2"><strong>{{ app.user.firstname  ~  '  '  ~  app.user.lastname|e }}</strong></p>
        <a class="btn btn-success btn-sm" href="{{ path('frontend_security_logout') }}">Déconnexion</a>
    </div>

    <hr class="sidebar-divider">
    <div class="text-center d-none d-md-inline">
        <button class="rounded-circle border-0" id="sidebarToggle"></button>
    </div>

</ul>
<!-- End of Sidebar -->