{#
/**
 * @file
 * Dark+'s theme override for the block entity refernece field for the tabs powered custom block
 *
 * @see darkplus_preprocess_field__field_mt_content_tabs()
 */
#}
{%
  set classes = [
    'field',
    'field--name-' ~ field_name|clean_class,
    'field--type-' ~ field_type|clean_class,
    'field--label-' ~ label_display,
  ]
%}
{%
  set title_classes = [
    'field__label',
    label_display == 'visually_hidden' ? 'visually-hidden',
  ]
%}
{{ attach_library('darkplus/field-mt-prd-content-tabs') }}
<div{{ attributes.addClass(classes) }}>
  {% if not label_hidden %}
    <h3{{ title_attributes.addClass(title_classes) }}>{{ label }}</h3>
  {% endif %}
  <ul class="nav nav-tabs">
    {% for item in items %}
      <li class="nav-item">
        <a class="nav-link mt-style-custom-tr mt-style-custom-tl {{ loop.first ? ' active' : '' }}" href="#tab-id-{{loop.index}}" data-toggle="tab">
          {{ item.content['#paragraph'].get('field_mt_tab_title').value }}
        </a>
      </li>
    {% endfor %}
  </ul>
  <div class="tab-content">
    {% for item in items %}
      <div class="tab-pane fade {{ loop.first ? ' active show' : '' }}" id="tab-id-{{loop.index}}">
        {{ item.content }}
      </div>
    {% endfor %}
  </div>
</div>
