{% extends '@base/models/brick.twig' %}
{% import '@base/macros/componentMacros.twig' as macros %}

{% set _name = 'b-t3plugin' %}

{% set brickConfig = { name: _name, tag: 'section' } %}

{% set classNames = { tag: _name, content: 'layout-brick-flex' } %}

{% set classNames = {
    tag: _name ~ '--' ~ (alignment|default('center')),
    heading: _name ~ '__heading',
} %}

{% set attributes = attributes|default({})|merge({}) %}

{% set dataAttributes = dataAttributes|default({})|merge({}) %}

{% block body %}
    {% if heading is defined and heading is not empty %}
        {% include '@elements/components/c-heading/c-heading.template.twig' with heading|merge({
            componentClassNames: { tag: classNames.heading }
        }) only %}
    {% endif %}

    {{ pluginContent|raw }}
{% endblock %}
