{% import "macros.twig" as menus_macros %}

{% if login.isLogged() %}
        <a href="{{ url_for('dashboard') }}"
            title="{{ _T("Go to Galette's dashboard") }}"
            class="{% if cur_route == "dashboard" %}active {% endif %}item"
        >
            <div class="image header title">
                <i class="compass icon" aria-hidden="true"></i>
                {{ _T("Dashboard") }}
            </div>
        </a>
{% endif %}

{% set menus = callstatic('\\Galette\\Core\\Galette', 'getAllMenus') %}
{% for menu in menus %}
    {{ menus_macros.renderMenu(menu.title, menu.icon, menu.items) }}
{% endfor %}
