{# LIBRARIES #}
{{ attach_library('altcom_ajax/altcom_ajax') }}
{{ attach_library('ui_patterns/libraries.bs_collapse') }}
{{ attach_library('ui_patterns/libraries.bs_buttons') }}
{{ attach_library('ui_patterns/jc_dropdown.jc_base') }}
{{ attach_library('ui_patterns/jc_dropdown.jc_dropdown_lib') }}
{{ attach_library('ui_patterns/jc_embed_routes.jc_embed_routes_lib') }}

{# VARIABLES #}
{% set footer_text = element.footerText %}
{% set hide_footer = TRUE %}
{% set header_title = header_title|default("<i class='fas fa-info mx-1'></i> Live travel updates") %}
{% set status_message_separator = status_message_separator|default(' - ') %}

{# TEMPLATE #}
<div id="jcs-embed-routes" class="jcs-embed">

  <div class="jcs-embed-routes-header mb-2">
    <h2 class="mb-0">{{ header_title|raw }}</h2>
    <div class="update ms-auto">Last update: {{ "now"|date("H:i", "Europe/London") }}</div>
  </div>

  {% include "@organisms/tm-jc/jc-modal/jc-modal-items/journey-check-modal-items.html.twig" %}

  <!-- Pseudo footer -->
  <div class="jcmf">
    {% if footer_text %}
      <h2 class="text-normal">

      <span id="sgha" class="{{ (footer_text) ? 'service-update-anchor' }} bel belianu">
        <span class="bell">{{ footer_text }}</span>
      </span>

      </h2>
    {% endif %}
  </div>
  <!-- / Pseudo footer -->

</div>
