<div class="accordion" id="{{ accordionId }}">
{% if(items is defined) %}
{% for item in items %}
{% set itemId = [accordionId, item.partTitle|slug]|join('-')|lower %}
<div class="accordion-item yellow my-2 border-0 rounded-0">
<div class="accordion-header" id="{{ itemId }}">
<button class="d-flex align-items-center accordion-button icon collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-{{ itemId }}" aria-expanded="false" aria-controls="collapse-{{ itemId }}">
<span class="fw-bolder">{{ item.partTitle }}</span>
</button>
</div>
<div id="collapse-{{ itemId }}" class="accordion-collapse collapse" aria-labelledby="{{ itemId }}" data-bs-parent="#{{ accordionId }}">
<div class="accordion-body">
{{ item.partText|raw }}
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="accordion-item my-2 border-0 rounded-0">
{% set itemId = [accordionId, 'accordion'|slug]|join('-')|lower %}
<div class="accordion-header" id="{{ itemId }}">
<button class="d-flex align-items-center accordion-button icon collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-{{ itemId }}" aria-expanded="false" aria-controls="collapse-{{ itemId }}">
<span class="fw-bolder">{{ title|default('Accordion Title') }}</span>
</button>
</div>
<div id="collapse-{{ itemId }}" class="accordion-collapse collapse" aria-labelledby="{{ itemId }}" data-bs-parent="#{{ accordionId }}">
<div class="accordion-body">
{% block accordion_body %}{% endblock %}
</div>
</div>
</div>
{% endif %}
</div>