{#
@file
 * Vartheme BS5 Starter Kit implementation for the Accordion Block component.
 *
 * Available Properties:
 * - title_tag: Heading HTML tag (h1, h2, h3, h4, h5, h6)
 * - heading: The content of the heading.
 * - block_accordion_utility_classes: This property contains an array of utility classes that can
 *                    be used to add extra Bootstrap utility classes or custom
 *                    classes to this component.
 */
#}

{% set block_accordion_utility_classes = block_accordion_utility_classes ? block_accordion_utility_classes : [] %}

{%
  set classes = [
    'block',
    'accordion-block',
  ]|merge(block_accordion_utility_classes)
%}

<div{{ attributes.addClass(classes) }}>
  {% if title_prefix %}
    {{ title_prefix }}
  {% endif %}
  {% include "vartheme_bs5:accordion" with {
    title_tag: title_tag,
    title: heading,
    header_tag: 'h4',
    items: items,
    toggle_all: toggle_all,
  } only %}
  {% if title_suffix %}
    {{ title_suffix }}
  {% endif %}
</div>
