{# 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_text_top or badge_text_bottom or badge_graphic_image %}
    {% include "@molecules/tm-bits/tm-bits-badge.twig" with {
      'badge_color': badge_color,
      'badge_text': badge_text_top,
      'badge_text_large': badge_text_bottom,
      'floating': true,
      'badge_img_alt': badge_graphic_image['alt'],
      'badge_img_url': badge_graphic_image['url'],
      'badge_img_attrs': badge_graphic_image['img_attributes'],
    } 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 %}
