{#
@file
 * Vartheme BS5 Starter Kit implementation for the CTA Block component.
 *
 * Available Properties:
 * - heading_tag: Heading HTML tag (h1, h2, h3, h4, h5, h6)
 * - heading_text: The content of the heading.
 * - block_cta_utility_classes: This property contains an array of utility classes that can
 *                    be used to add extra Bootstrap utility classes or custom
 *                    classes to this component.
 */
#}

{% set title_tag = ((title_tag == '') or (title_tag == '_none')) ? 'h3' : title_tag %}
{% set block_cta_utility_classes = block_cta_utility_classes ? block_cta_utility_classes : [] %}

{%
  set classes = [
    'block',
    'cta-block',
  ]|merge(block_cta_utility_classes)
%}

<div{{ attributes.addClass(classes) }}>

  {{ title_prefix }}
  {% if label|render|striptags|trim %}
  {% include 'vartheme_bs5:heading' with {
      html_tag: title_tag,
      content: label,
      block_cta_utility_classes: ['cta-heading', 'mb-2'],
    } only %}
  {% endif %}
  {{ title_suffix }}

  <div class="cta-body mb-2">{{ content }}</div>
</div>