{#
/**
 * @file
 * Dark+'s theme override for the block entity refernece field for the dropdowns powered custom block
 *
 * @see darkplus_preprocess_field__block_content__mt_tabs_block()
 */
#}
{%
  set classes = [
    'field',
    'field--name-' ~ field_name|clean_class,
    'field--type-' ~ field_type|clean_class,
    'field--label-' ~ label_display,
    'field--mt-dropdowns',
    'clearfix',
  ]
%}
{%
  set title_classes = [
    'field__label',
    label_display == 'inline' ? 'inline',
  ]
%}
<div{{ attributes.addClass(classes) }}>
  {% if not label_hidden %}
    <h3{{ title_attributes.addClass(title_classes) }}>{{ label }}</h3>
  {% endif %}
    {% for item in items %}
    <div class="btn-group">
      <div class="dropdown">
        <button class="dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          {% if item.content['#paragraph'].field_mt_dropdown_fa_icon_active['0'].icon_name %}
            <i class="expanded-icon {{ item.content['#paragraph'].field_mt_dropdown_fa_icon_active['0'].style }} fa-{{ item.content['#paragraph'].field_mt_dropdown_fa_icon_active['0'].icon_name }}"></i>
          {% endif %}
          {% if item.content['#paragraph'].field_mt_dropdown_fa_icon['0'].icon_name %}
            <i class="collapsed-icon {{ item.content['#paragraph'].field_mt_dropdown_fa_icon['0'].style }} fa-{{ item.content['#paragraph'].field_mt_dropdown_fa_icon['0'].icon_name }}"></i>
          {% endif %}
        </button>
        <div class="dropdown-menu dropdown-menu-right">
          {{ item.content }}
        </div>
      </div>
    </div>
    {% endfor %}
</div>
