{% set help = '/files/help/help_demandeur.pdf' %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('/css/custom/style-menu.css') }}">
<link rel="stylesheet" href="{{ asset('/css/custom/switch-language.css') }}">
<link rel="stylesheet" href="{{ asset('/css/menu.css') }}">
{% endblock %}
{% if app.user %}
<div class="container-fluid fixed-top px-0 wow fadeIn bg-white" data-wow-delay="0.1s" id="menu-log-in">
<nav class="navbar navbar-expand-lg fixed-top navbar-light py-lg-0 px-lg-5 wow fadeIn bg-white" data-wow-delay="0.1s" id="nav" >
<div class="logo">
<a href="{{ path('front') }}" class="navbar-brand ms-4 ms-lg-0">
<img src="{{ asset('css/front/img/igppfinallogo/logo-fr.png') }}">
</a>
</div>
<div class="mobile-menu-nav">
<li class="nav-item dropdown">
<a href="#" class="dropdown-toggle dropbtn display-mobile" id="notif" style="padding: 10px 15px;" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa-solid fa-bell"></i></a>
{{ render( url('app_notification_list') ) }}
</li>
{# <li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle dropbtn display-desktop notification-ring" id="notif" role="button" data-bs-toggle="dropdown" aria-expanded="false"><i class="fa-solid fa-bell" style="font-size: 25px;"></i></a>
{{ render( url('app_notification_list') ) }}
</li> #}
{% if 'ROLE_SUPER_ADMIN' in app.user.getRoles() %}
{% set help = '/files/help/help_super-admin.pdf' %}
{% elseif 'ROLE_ADMIN' in app.user.getRoles() %}
{% set help = '/files/help/help_admin.pdf' %}
{% elseif 'ROLE_RD' in app.user.getRoles() %}
{% set help = '/files/help/help_responsable.pdf' %}
{% endif %}
<a href="{{ asset( help ) }}" target="_blank" id="help">
<i class="fa-solid fa-circle-info font-icon" ></i>
</a>
<div class="content-language-switch mobile">
<div class="switch" id="switch">
<input id="language-toggle" class="check-toggle check-toggle-round-flat" type="checkbox"
data-ar="{{ path('app_change_locale',{'_locale' : 'ar_TN'}) }}"
data-fr="{{ path('app_change_locale',{'_locale' : 'fr'}) }}"
{{ app.session.get('_locale') == 'ar_TN' ? 'checked="checked"' : '' }}>
<label for="language-toggle"></label>
<span class="fr">FR</span>
<span class="ar">AR</span>
</div>
</div>
<div class="d-flex user-profile">
<li class="nav-item dropdown user icon-name ">
{% if app.user.getPhoto() %}
<a class="img-profil marg_link dropdown-toggle dropbtn img" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"><img src="{{ asset('PhotoUsers/' ~ app.user.getPhoto()) }}" alt=""></a>
{% else %}
<a class="img-profil marg_link dropdown-toggle dropbtn img" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false"> <img src="{{ asset('images/default.png') }}" alt=""></a>
{% endif %}
{% if app.user.getPrenom() %}
<a class="nav-link dropdown-toggle dropbtn user" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ app.user.getPrenom() }}
{{ app.user.getNom() }}
</a>
{# <button class="dropbtn">
{{ app.user.getPrenom() }}
{{ app.user.getNom() }}
</button> #}
{% else %}
<a class="nav-link dropdown-toggle dropbtn user" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ app.user.getEmail() }}
</a>
{# <button class="dropbtn">{{ app.user.getEmail() }}</button> #}
{% endif %}
<ul class="dropdown-menu" aria-labelledby="navbarDropdown" id="dropdownUser">
<li>
<a class="dropdown-item" href="#">
{{ app.user.getPrenom() }}
{{ app.user.getNom() }}
</a>
</li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="{{ path('app_profil') }}"><i class="fa-solid fa-user"></i> {% trans %} profil {% endtrans %}</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="{{ path('app_logout') }}"><i class="fa-solid fa-arrow-right-from-bracket"></i> {% trans %} se_deconnecter {% endtrans %}</a></li>
</ul>
{# <div class="dropdown-content">
<a href="{{ path('app_profil') }}">Modifier profil</a>
<a href="{{ path('app_logout') }}">Se déconnecter</a>
</div> #}
</li>
</div>
<button type="button" class="navbar-toggler me-4" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbarCollapse">
<div class="navbar-nav ms-auto col-md-12">
<div class="row userdetails align-items-center">
<div class="menu-top">
<div class="navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0 align-items-center justify-content-center" id="">
<li class="nav-item">
<a href="{{ path('front') }}" class="nav-link active"><i class="fa-solid fa-house-chimney"></i></a>
</li>
{% if 'ROLE_ADMIN' not in app.user.getRoles() and 'ROLE_RD' not in app.user.getRoles() %}
<li class="nav-item">
<a href="{{ ( app.user.getCompleted() ) ? path('app_demande_index') : 'javascript:void(0);' }}" class="{{ ( app.user.getCompleted() ) ? 'm-f nav-link' : 'disabled' }}" style="color: #0000008c">{% trans %} mes_demande {% endtrans %}</a>
</li>
<li class="nav-item dropdown">
<a href="{{ ( app.user.getCompleted() ) ? path( 'app_reclamation_list', { 'type' : 'all', 'id' : 0 } ) : 'javascript:void(0);' }}" class="{{ ( app.user.getCompleted() ) ? 'm-f nav-link' : 'disabled'}}" style="color: #0000008c">{% trans %} mes_reclamation {% endtrans %}</a>
</li>
<li class="nav-item dropdown">
<a href="{{ ( app.user.getCompleted() ) ? path('app_meeting') : 'javascript:void(0);' }}" class=" {{ ( app.user.getCompleted() ) ? 'm-f nav-link' : 'disabled' }}" style="color: #0000008c">{% trans %} mes_reunion {% endtrans %}</a>
</li>
{% else %}
<li class="nav-item dropdown">
<a href="{{ ( app.user.getCompleted() ) ? path('admin_dashboard') : 'javascript:void(0);' }}" class="{{ ( app.user.getCompleted()) ? 'm-f nav-link' : 'disabled' }}" style="color: #0000008c">{% trans %} mon_espace {% endtrans %}</a>
</li>
{% endif %}
<div class="content-language-switch tablt-mobile ">
<div class="switch" id="switch">
<input id="language-toggle" class="check-toggle check-toggle-round-flat" type="checkbox"
data-ar="{{ path('app_change_locale',{'_locale' : 'ar_TN'}) }}"
data-fr="{{ path('app_change_locale',{'_locale' : 'fr'}) }}"
{{ app.session.get('_locale') == 'ar_TN' ? 'checked="checked"' : '' }}>
<label for="language-toggle"></label>
<span class="fr">FR</span>
<span class="ar">AR</span>
</div>
</div>
</ul>
</div>
</div>
</div>
</div>
</div>
</nav>
</div>
{% else %}
<div class="container-fluid fixed-top px-0 wow fadeIn" data-wow-delay="0.1s" id="menu-log-out">
<nav class="navbar navbar-expand-lg navbar-light py-lg-0 px-lg-5 wow fadeIn" data-wow-delay="0.1s">
<div class="logo">
<a href="{{ path('front') }}" class="navbar-brand ms-4 ms-lg-0">
<img src="{{ asset('css/front/img/igppfinallogo/logo-fr.png') }}">
</a>
</div>
<span id="notif-lang-mobile">
<a href="{{ asset( help ) }}" class="item_menu_center" target="_blank" id="help"> <i class="fa-solid fa-circle-info font-icon customNavs cnx desctop" ></i> </a>
<div class="content-language-switch item_menu_center cnx desctop " id="lang-switch">
<div class="switch">
<input id="language-toggle" class="check-toggle check-toggle-round-flat" type="checkbox"
data-ar="{{ path('app_change_locale',{'_locale' : 'ar_TN'}) }}"
data-fr="{{ path('app_change_locale',{'_locale' : 'fr'}) }}"
{{ app.session.get('_locale') == 'ar_TN' ? 'checked="checked"' : '' }}>
<label for="language-toggle"></label>
<span class="fr">FR</span>
<span class="ar">AR</span>
</div>
</div>
</span>
<button type="button" class="navbar-toggler me-4" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
<span class="navbar-toggler-icon" style="margin-top :5px" ></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<div class="navbar-nav ms-auto col-md-12">
<div class="style-menu ms-auto p-4 p-lg-0 "
>
<a href="{{ path('login') }}" class="nav-item nav-link main-btn">{% trans %} se_connecter {% endtrans %}</a>
<a href="{{ path('app_register') }}" class="ml-5 nav-item nav-link second-btn">{% trans %} inscrire {% endtrans %}</a>
<a href="{{ asset('/files/help/help_demandeur.pdf') }}" class="item_menu_center" target="_blank" id="help"> <i class="fa-solid fa-circle-info font-icon customNavs cnx mobile" ></i> </a>
<div class="content-language-switch item_menu_center cnx mobile" id="lang-switch">
<div class="switch">
<input id="language-toggle" class="check-toggle check-toggle-round-flat" type="checkbox"
data-ar="{{ path('app_change_locale',{'_locale' : 'ar_TN'}) }}"
data-fr="{{ path('app_change_locale',{'_locale' : 'fr'}) }}"
{{ app.session.get('_locale') == 'ar_TN' ? 'checked="checked"' : '' }}>
<label for="language-toggle"></label>
<span class="fr">FR</span>
<span class="ar">AR</span>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
</div>
{% endif %}