{#
/**
 * Copyright © 2003-2024 The Galette Team
 *
 * This file is part of Galette (https://galette.eu).
 *
 * Galette is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Galette is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
 */
#}
    <nav id="sidebarmenu" class="ui simple left vertical accordion menu sidebar">
{% if not login.isLogged() %}
    {% if cur_route != "login" %}
        {% import "macros.twig" as menus_macros %}
        {% set item = {
            'label': _T("Home"),
            'title': _T("Go back to Galette homepage"),
            'route': {'name': 'slash', 'alias': 'login'},
            'icon': 'home'
        } %}
        {{ menus_macros.renderMenuItem(item.label, item.title, item.route, item.icon, null, 'right center') }}
    {% endif %}

    {% include "elements/navigation/public_pages.html.twig" with {
            tips_position: "right center",
            sign_in: true,
            mode: "default"
    } %}
{% else %}
    {% include "elements/navigation/navigation_items.html.twig" with {
            mode: "default"
    } %}
{% endif %}
    {% include "elements/language.html.twig" with {
            ui: "item"
    } %}
{% if login.isLogged() %}
        {% include "elements/logged_user.html.twig" with {
                ui: "item"
        } %}
{% endif %}
        <div class="ui basic center aligned segment">
            {% include "elements/modes.html.twig" %}
        </div>
    </nav>
