{% load icon_tags static %}

<ul role="tablist" class="nav nav-tabs lined-tabs flex-column flex-sm-row bg-light w-100 shadow">
  {% for tab in tabs %}
    <li class="nav-item" title="{{ tab.tooltip }}">
      <a class="nav-link {% if tab.active %}active{% endif %}" href="{% if tab.href %}{{ tab.href }}{% else %}{{ request.path }}{% endif %}">
        <i class="{{ tab.icon_style_prefix|default:"fas" }} fa-{{ tab.icon}}"></i> {{ tab.title|truncatechars:50 }}
        {% if not forloop.last and forloop.counter >= min_num_tabs %}
          {# we only want the double angle for all tabs which could be the last but are not #}
        {% fa5_icon 'angle-double-right' %}
        {% endif %}
      </a>
    </li>
  {% endfor %}
  {% if error %}
    <li class="nav-item">
      <a class="nav-link active">
        {% fa5_icon 'bolt' %} Error
      </a>
    </li>
  {% endif %}
</ul>
