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

{# PARENT VARIABLES #}
{% set card_class = "event-card offer-card" %}
{% set link_scope = "top" %}
{% set show_header = true %}
{% set show_footer = true %}
{% set show_itinerary = show_itinerary %}

{# LOCAL VARIABLES #}
{% set offer_text = offer_text|default("missing") %}
{% set admission_price = admission_price|default("missing") %}

{# BLOCKS #}
{% block card_header %}
  {{ attach_library('ui_patterns/offer_card.offer_card_lib') }}

  {% if badge %}
    {% include "@molecules/tm-bits/tm-bits-badge.twig" with {
      'badge_text': badge_text_top,
      'badge_text_large': badge_text_bottom,
      'floating': true,
    } only%}
  {% endif %}

  {{ parent() }}

{% endblock %}

{% block card_footer %}

  {% if show_itinerary and oid %}
    <span data-itinerary-id="{{ oid }}"
          data-itinerary-action="toggle"
          data-itinerary-animate="true"
          class="itinerary icon-toggle"
    >
    </span>
  {% endif %}

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

{% endblock %}
