{#
/**
 * @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 = [
  bundle ? 'block--' ~ bundle|clean_class,
  id ? 'block--' ~ id|replace({"_": "-"})|clean_class,
]|merge(utility_classes ? utility_classes : []) %}

  <{{ html_tag|default('div') }}{{ attributes|without('id').addClass(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 %}

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