{# LIBRARIES #}
{{ attach_library('ui_patterns/nre_ad_boards.nre_ad_lib') }}

{# VARIABLES #}
{% set departure_data = departure_data|default(null) %}
{% set arrival_data = arrival_data|default(null) %}

{% if departure_data or arrival_data %}
  <div class="bt_table_wrapper">

    {# Departures #}
    {% if departure_data %}
      <h4>Departures</h4>
      {% include "@organisms/tm-ldb/nre-ad-table/_nre-ad-table.twig" with{
        "content_data": departure_data,
        "type": 'depart',
      } %}
    {% endif %}

    {# Arrivals #}
    {% if arrival_data %}
      <h4>Arrivals</h4>
      {% include "@organisms/tm-ldb/nre-ad-table/_nre-ad-table.twig" with{
        "content_data": arrival_data,
        "type": 'arrive',
      } %}
    {% endif %}

  </div>
{% endif %}
