{# LIBRARIES #}
{{ attach_library('ui_patterns/station_header.station_header_lib') }}
{% set swap_sidebar_form = swap_sidebar_form|default(false) %}
{% set check_icon = global_icon_check|default('fal fa-check-square') %}

{# TEMPLATE #}
{% if swap_sidebar_form %}
  <div id="bkf-mobile-target" data-alt-toggle="swapper" data-alt-target=".exp-frm-wrap" data-alt-break-down="md"></div>
{% endif %}

<div id="station-header" class="st-hdr">

  <div class="row">

    <div class="col-md-12 st-name">
      <h2>{{ station }}</h2>
    </div>

    <div class="col-md-6 st-addr">
      <h3>Address:</h3>
      {% for line in address %}
        {{ line }}<br>
      {% endfor %}
    </div>

    <div class="col-md-6 st-off">
      <h3>Ticket office:</h3>
      {% for line in ticket_office %}
        {{ line }}<br>
      {% endfor %}
    </div>

  </div>

  <div class="map mt-4 mb-4">
    {{ map }}
  </div>

  {% if checklist %}
    <div class="row">
      {% for items in checklist|batch((checklist|length / 2), '') %}
        <div class="col-md-6">
          <ul class="fa-ul">
            {% for item in items %}
              {% if item %}
                <li><span class="fa-li"><i class="{{ check_icon }}"></i></span> {{ item }}</li>
              {% endif %}
            {% endfor %}
          </ul>
        </div>
      {% endfor %}
    </div>
  {% endif %}

  {% if post %}
    <div class="st-post">
      {{ post }}
    </div>
  {% endif %}

</div>
