{#
/**
 * @file
 * Template for a Bootstrap 5 Accordion container.
 *
 * This template provides the outer container for accordion items.
 *
 * Available variables:
 * - attributes: HTML attributes for the wrapper element.
 * - flush: (boolean) Remove default background, borders, and rounded corners
 *   to render accordions edge-to-edge with their parent container.
 * - accordion_id: A unique ID for the accordion container. Should be passed
 *   in explicitly for SSR-safe, deterministic output.
 * - custom_class: (optional) Additional CSS classes for the accordion container.
 *
 * Available slots:
 * - accordion_content: Add accordion item components here.
 *
 * @ingroup themeable
 */
#}

{# accordion_id should be explicitly provided. A fallback is supplied for local previews only. #}
{% set accordion_id = accordion_id|default('accordion-container') %}

{% set classes = [
  'accordion',
  flush ? 'accordion-flush' : '',
  custom_class|default(''),
]|filter(v => v) %}

<div{{ attributes.addClass(classes).setAttribute('id', accordion_id) }}>
  {% block accordion_content %}
    {# Render the individual accordion items here. #}
  {% endblock %}
</div>