{# LIBRARIES #}
{% extends "@molecules/tm-bs/card/card.twig" %}

{# VARIABLES #}
{% set alt = title ~ ' ' ~ body|striptags %}
{% set card_class = card_class|default("child-card cbelianr") %}
{% set link_scope = link_scope|default('card') %}
{% set show_footer = show_footer|default(false) %}
{% set show_header = show_header|default(true) %}
{% set card_class = card_class|default('child-card')  %}

{# BLOCK HEADER #}
{% block card_header %}
  {{ attach_library('ui_patterns/child_card.child_card_lib') }}
  {# Parent header from BS Card. In this case it's rendering the image. #}
  {{ parent() }}
{% endblock %}

{# BLOCK BODY #}
{% block card_body %}

  {% if title %}
    <h2 class="card-title">
      {% include "@atoms/tm-links/icon-bookended/icon-bookended.twig" with {
        "text": title,
        "icon_right": global_icon_right|default('fas fa-chevron-right'),
        'display': 'noflex',
      } only %}
    </h2>
  {% endif %}

  {% if body %}
    <div class="card-body-text">
      {{ body }}
    </div>
  {% endif %}

{% endblock %}
