{#
/**
 * @file
 * Template for a 'Card group' Paragraph.
 */
#}
{% set classes = [
  'paragraph',
  not paragraph.isPublished() ? 'paragraph--unpublished',
  paragraph.bundle|clean_class ~ '--' ~ view_mode|clean_class,
  'py-7'
] %}

{% set background_style = paragraph.field_background_style.0.value|default(null) %}
{% if background_style %}
  {% set classes = classes|merge(['bg-' ~ background_style|clean_class]) %}

  {% if background_style == 'dark' %}
    {% set classes = classes|merge(['text-light']) %}
  {% endif %}
{% endif %}

{% block paragraph %}
  <div{{attributes.addClass(classes)}}>
    {% block content %}
      <div class="container">
        {{ content.field_title }}
        <div class="card-deck">
          {{ content|without('field_title', 'field_buttons') }}
        </div>
        {{ content.field_buttons}}
      </div>
    {% endblock %}
  </div>
{% endblock paragraph %}
