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

{# VARIABLES #}
{% set card_class = "event-card" %}
{% set link_scope = "top" %}
{% set content_class = 'cbelianr' %}
{% set show_header = true %}
{% set show_footer = true %}

{# BLOCKS #}
{% block card_body %}
  {# Not happy with this, currently has to be in a block. Might beed libs block #}
  {{ attach_library('ui_patterns/event_card.event_card_lib') }}

  {% if title %}
    {% include "@atoms/tm-links/icon-bookended/icon-bookended.twig" with {
      "text": title,
      "icon_right": "fas fa-chevron-right",
      "tag_name": "h2",
    } only %}
  {% endif %}

  {% if content %}
  <div class="trunc-desc">
    <div class="event-body-text">
      {{ content }}
    </div>
  </div>
  {% endif %}

  {% if location %}
    <div class="{{ content ? 'wfade' : 'nfade' }}">
      {% include "@atoms/tm-links/icon-bookended/icon-bookended.twig" with {
        "text": "Closest location: #{location}",
        "url": url,
        "icon_left": "fas fa-map-marker-alt",
        "class": "location"
      } only %}
    </div>
  {% endif %}

{% endblock %}

{% block card_footer %}
  {% if tags %}
    {% include "@molecules/tm-cards/card-partials/tags.html.twig" %}
  {% endif %}
{% endblock %}
