{% load i18n wagtailcore_tags %}
<div class="fr-tabs fr-mb-2w">
  {% translate "Tabs group" as tabs_group %}
  <ul class="fr-tabs__list" role="tablist" aria-label="{{ tabs_group }}">
    {% for tab_block in block.value %}
      <li role="presentation">
        <button id="tabpanel-{{ block.id }}-{{ forloop.counter }}"
                class="fr-tabs__tab fr-icon-checkbox-line fr-tabs__tab--icon-left"
                tabindex="{% if forloop.first %}0{% else %}-1{% endif %}"
                role="tab"
                aria-selected="{% if forloop.first %}true{% else %}false{% endif %}"
                aria-controls="tabpanel-{{ block.id }}-{{ forloop.counter }}-panel">
          {{ tab_block.value.title }}
        </button>
      </li>
    {% endfor %}
  </ul>
  {% for tab_block in block.value %}
    <div id="tabpanel-{{ block.id }}-{{ forloop.counter }}-panel"
         class="fr-tabs__panel{% if forloop.first %} fr-tabs__panel--selected{% endif %}"
         role="tabpanel"
         aria-labelledby="tabpanel-{{ block.id }}-{{ forloop.counter }}"
         tabindex="0">
      {% include "sites_conformes_content_manager/blocks/blocks_stream.html" with stream=tab_block.value.content %}
    </div>
  {% endfor %}
</div>
