{% set wrapperAttributes = attrs(cssID)
    .addClass([class, 'ce_accordion', 'ce_text', 'block'])
    .addStyle(style|default)
    .mergeWith(wrapperAttributes|default)
%}

<section{{ wrapperAttributes }}>

    <div{{ attrs()
        .addClass(toggler)
        .addStyle(headlineStyle|default)
    }}>
        {{ headline|sanitize_html('contao')|insert_tag_raw }}
    </div>

    <div class="{{ accordion }}">
        <div>
            {% if not addBefore %}
                {{ text|default|sanitize_html('contao')|csp_inline_styles|insert_tag_raw }}
            {% endif %}

            {% if addImage %}
                {{ include('@Contao/image.html.twig') }}
            {% endif %}

            {% if addBefore %}
                {{ text|default|sanitize_html('contao')|csp_inline_styles|insert_tag_raw }}
            {% endif %}
        </div>
    </div>

</section>
