{% from 'bs_nav_items.htm' import bs_nav_items with context -%}
{%- macro bs_navs(title=None, navs=None, menu_attrs=None) -%}
{% if navs is none -%}
    {% set navs = [] -%}
{% endif -%}
{% if menu_attrs is none -%}
    {% set menu_attrs = {'class': 'nav nav-tabs'} -%}
{% endif -%}
<ul {{ tpl.json_flatatt(menu_attrs) }}>
    {% if title is not none -%}
    <li class="bold"><a class="nav-link">{{ title }}</a></li>
    {% endif -%}
    {{ bs_nav_items(navs) }}
</ul>
{% endmacro -%}
{% if _render_ -%}
    {% if not isinstance(_render_, dict) -%}
        {% set _render_ = {
            'title': title or None,
            'navs': navs or None,
            'menu_attrs': menu_attrs or None,
        } -%}
    {% endif -%}
    {{ bs_navs(**_render_) }}
{% endif -%}
