{% if is_granted('IS_AUTHENTICATED_FULLY') and not is_granted('ROLE_REPRESENTATIVE') %}
<div class="dropdown">
<button class="btn btn-profile dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ app.user.lastname|striptags|slice(0, 25)|default(app.user.lastname) }}{% if app.user.lastname|length > 25 %}...{% endif %}
<img src="{{ asset('/img/icon-user.png') }}" alt="">
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li><a href="{{ document.getProperty('user_data_document').fullPath }}" class="dropdown-item">{{ 'Gegevens' | trans }}</a></li>
<li><a href="{{ document.getProperty('user_favorites_document').fullPath }}" class="dropdown-item">Mijn bestellijsten</a></li>
<li><a href="{{ document.getProperty('user_products_document').fullPath }}" class="dropdown-item">Reeds bestelde producten</a></li>
<li><a href="{{ document.getProperty('user_orders_document').fullPath }}" class="dropdown-item">Eerdere bestellingen</a></li>
<li><a href="{{ document.getProperty('user_backorders_document').fullpath }}" class="dropdown-item">Mijn backorders</a></li>
{% if is_granted('IS_IMPERSONATOR') %}
<li>
<a
href="{{ path('impersonator_logout') }}"
class="dropdown-item"
>Terug naar hoofdaccount</a>
</li>
{% else %}
<li><a href="{{ path('account-logout') }}" class="dropdown-item">{{ 'Log uit' | trans }}</a></li>
{% endif %}
</ul>
</div>
{% elseif is_granted('IS_AUTHENTICATED_FULLY') and is_granted('ROLE_REPRESENTATIVE') %}
<div class="dropdown">
<button class="btn btn-profile dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{ app.user.name|striptags|slice(0, 25)|default(app.user.name) }}{% if app.user.name|length > 25 %}...{% endif %}
<img src="{{ asset('/img/icon-user.png') }}" alt="">
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li><a href="{{ path('representatives-clients') }}" class="dropdown-item">{{ 'Klanten overzicht' | trans }}</a></li>
<li><a href="{{ path('account-representative-logout') }}" class="dropdown-item">{{ 'Log uit' | trans }}</a></li>
</ul>
</div>
{% else %}
<a href="{{ path('account-login') }}" class="btn btn-profile">
<img src="{{ asset('/img/icon-user.png') }}" alt="">
{{ 'Inloggen' | trans }}
</a>
{% endif %}