{% load i18n %}

{% load navigation_tags %}
{% load smart_settings_tags %}

<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">{% trans 'Toggle navigation' %}</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{% url home_view %}">{% smart_setting 'COMMON_PROJECT_TITLE' %}</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                {% navigation_resolve_menu name='main' as topbar_menus_results %}
                {% for tobpar_menu_result in topbar_menus_results %}
                    {% for link_group in tobpar_menu_result.link_groups %}
                        {% for link in link_group.links %}
                            {% with 'true' as as_li %}
                            {% with 'true' as hide_active_anchor %}
                            {% with 'active' as li_class_active %}
                            {% with 'first' as li_class_first %}
                            {% with ' ' as link_classes %}
                                {% include 'navigation/generic_subnavigation.html' %}
                            {% endwith %}
                            {% endwith %}
                            {% endwith %}
                            {% endwith %}
                            {% endwith %}
                        {% endfor %}
                    {% endfor %}
                {% endfor %}

                {% get_menu_links name='main' as menu_links %}
                {% for link_set in menu_links %}
                    {% for link in link_set %}
                        {% with 'true' as as_li %}
                        {% with 'true' as hide_active_anchor %}
                        {% with 'active' as li_class_active %}
                        {% with 'first' as li_class_first %}
                        {% with ' ' as link_classes %}
                            {% include 'navigation/generic_subnavigation.html' %}
                        {% endwith %}
                        {% endwith %}
                        {% endwith %}
                        {% endwith %}
                        {% endwith %}
                    {% endfor %}
                {% endfor %}
            </ul>
        </div>
    </div>
</nav>
