{#
/**
 * @file
 * Vartheme BS5 Starter Kit implementation for the Block component.
 *
 * Available config:
 * - html_tag: The HTML tag for the block.
 */
#}
{% set bundle = bundle ? 'block--' ~ bundle|clean_class : "" %}
{% set id = id ? 'block--' ~ id|replace({"_": "-"})|clean_class : "" %}
{% set html_tag = html_tag ? html_tag : 'div' %}
{% set classes = [
  'block',
  'block-html-code',
  bundle,
  id
] %}

<{{ html_tag }}{{ attributes.addClass(classes) }}>

  {% if title_prefix %}
    {{ title_prefix }}
  {% endif %}

  {% if label %}
    {% block label %}
      {% embed "vartheme_bs5:heading" with {
        attributes: title_attributes,
        content: label,
        html_tag: 'h2'
      } only %}
      {% endembed %}
    {% endblock %}
  {% endif %}

  {% if title_suffix %}
    {{ title_suffix }}
  {% endif %}
  {{ content }}
</{{ html_tag }}>
