{#
/**
 * @file
 * Template for a Block component.
 *
 * Available config:
 * - html_tag: The HTML tag for the block.
 * - utility_classes: An array of utility classes.
 */
#}
{% set classes = [
  'block-group',
  bundle ? 'block-group--' ~ bundle|clean_class,
  id ? 'block-group--' ~ id|replace({"_": "-"})|clean_class,
]|merge(utility_classes ? utility_classes : []) %}
{% set blockgroup_content_classes = [
  'block-group__inner'
]|merge(blockgroup_content_classes ? blockgroup_content_classes : []) %}

<{{ html_tag|default('div') }}{{ attributes|without('id').addClass(classes) }}>

  <div {{ blockgroup_content_attributes.addClass(blockgroup_content_classes)}}>

  {{ title_prefix }}
  {% if label %}
    {% block label %}
      {{ include('sector_theme:block-title', {
        attributes: title_attributes,
        classes: ['block__title']|merge(title_classes ? title_classes : []),
        title_tag: title_tag|default('h2'),
        label: label
      }) }}
    {% endblock %}
  {% endif %}
  {{ title_suffix }}

  {% block content %}
    {{ content }}
  {% endblock %}
  </div>
</{{ html_tag|default('div') }}>
{% if libraries %}
  {% for library in libraries %}
    {{ attach_library(library) }}
  {% endfor %}
{% endif %}
