{#
/**
 * @file
 * CivicTheme Basic Content component.
 *
 * Props:
 * - theme: [string] Theme variation (light or dark).
 * - is_contained: [boolean] Whether to wrap the content in a container.
 * - vertical_spacing: [string] Vertical spacing position (top, bottom, both).
 * - with_background: [boolean] Whether to display with a background.
 * - attributes: [string] Additional HTML attributes.
 * - modifier_class: [string] Additional CSS classes.
 *
 * Slots:
 * - content: HTML content.
 */
#}

{% set with_background_class = with_background ? 'ct-basic-content--with-background' : '' %}
{% set vertical_spacing_class = vertical_spacing in ['top', 'bottom', 'both'] ? 'ct-vertical-spacing-inset--%s'|format(vertical_spacing) : '' %}
{% set theme_class = 'ct-theme-%s'|format(theme|default('light')) %}
{% set modifier_class = '%s %s %s %s'|format(theme_class, vertical_spacing_class, with_background_class, modifier_class|default('')) %}

{% set is_contained = is_contained is defined ? is_contained : true %}

{% if content is not empty %}
  <div class="ct-basic-content {{ modifier_class -}}" {% if attributes is not empty %}{{- attributes|raw -}}{% endif %}>
    {% if is_contained %}
    <div class="container">
      <div class="row">
        <div class="col-xxs-12">
          {% endif %}
          {{- content|raw -}}
          {% if is_contained %}
        </div>
      </div>
    </div>
    {% endif %}
  </div>
{% endif %}
