{#
/**
 * @file
 * Template for a Collapsible Card component.
 *
 * Available config:
 * - block_utility_classes: An array of utility classes.
 */
#}
{%
  set attributes = create_attribute()
%}
{%
  set classes = [
    'collapsible-card',
    'collapsible-card--collapsed'
  ]|merge(block_utility_classes ? block_utility_classes : [])
%}
<div{{ attributes.addClass(classes) }}>

  <div class="collapsible-card__header">
    <button class="collapsible-card__toggle border-0 d-flex d-flex justify-content-between align-items-center w-100 px-4 py-3 bg-light">
      {% if title %}
        <span class="btn btn-link px-0">{{ title }}</span>
      {% endif %}

      {% block header %}
        {{ header }}
      {% endblock %}
    </button>
  </div>

  <div class="collapsible-card__content p-4">
    {% block content %}
      {{ content }}
    {% endblock %}
  </div>
</div>
