{% set base_class = d_p_single_text_blocks_base_class|default('d-p-single-text-block') %}
{% set modifiers = d_p_single_text_blocks_modifiers|default([])|merge([
  has_background ? 'has-media-background',
]) %}
{% set additional_classes = d_p_single_text_block_additional_classes|default([])|merge(['col']) %}

{% if is_tile %}
  {% set modifiers = modifiers|merge(['tile']) %}
{% endif %}

{% if is_grid %}
  {% set modifiers = modifiers|merge(['grid-column']) %}
{% endif %}

{% if paragraph.textAlign %}
  {% set additional_classes = additional_classes|merge(['text-' ~ paragraph.textAlign]) %}
{% endif %}

<div {{ bem(base_class, modifiers, '', additional_classes) }}>
  <div {{ bem('wrapper', [], base_class) }}>
    <div {{ bem('background', [], base_class) }}>
      <div {{ bem('background-media', [], base_class) }}>
        {% block background %}
        {% endblock %}
      </div>
    </div>

    <div {{ bem('content', [], base_class) }}>
      {% block header %}
      {% endblock %}

      {% block content %}
      {% endblock %}

      {% if with_price %}
        {% include "droopler_theme:price-block" with {
          sidebar: with_price_in_sidebar
        } %}
      {% endif %}
    </div>
  </div>
</div>
