<ul class="nav nav-tabs">
    {% for item in [
        {
            id: 'accueil', 
            label: 'Délégations pour absence'| trad, 
            route: 'Delegation.AbsenceDelegation.index', 
            badge: absenceDelegations | lengthTable,
        },
        {
            id: 'droit', 
            label: 'Délégations permanentes'| trad, 
            route: 'Delegation.PermanentDelegation.index', 
            badge: permanentDelegations | lengthTable,
        },
    ] | merge(items) | filter(v => v is not null) %}
        {% set isActive = (item.route == getRouteName()) %}
        <li class="{{ isActive ? 'active'}}">
            <a href="{{ isActive ? '#' : path(item.route) }}">
                {{- item.label -}}
                {% if item.badge > 0 %}
                    <span class="nb_affectation">{{ item.badge }}</span>
                {% endif %}
            </a>
        </li>
    {% endfor %}
</ul>
