<div class="card {{ section.stacked ? 'card-flex' }}" {{ html_attributes(section.attributes) }}>

    {% include "streams::form/partials/header" with {"section": section} %}

    {% if section.fields %}

        <div class="card-block card-body">
            {% include "streams::form/partials/fields" with {"fields": section.fields} %}
        </div>

    {% elseif section.tabs %}

        {# No card block - tabs push to the edges #}
        {% include "streams::form/partials/tabs" with {"tabs": section.tabs, "stacked": section.stacked} %}

    {% elseif section.groups %}

        {# No card block - tabs push to the edges #}
        {% include "streams::form/partials/groups" with {"groups": section.groups} %}

    {% elseif section.rows %}

        <div class="card-block card-body">
            {% include "streams::form/partials/rows" with {"rows": section.rows} %}
        </div>

    {% endif %}

</div>
