{# LIBRARIES #}
{{ attach_library('ui_patterns/libraries.bs_collapse') }}
{{ attach_library('ui_patterns/sa_lb_section.sa_lb_section_lib') }}

{# TEMPLATE #}
{% if links %}
  <div id="sa-lb-section" class="collapse show row">

    <h2 class="col-sm-6">
      <i class="fas fa-exclamation-triangle"></i>
      Important information
    </h2>

    <div class="col-sm-6">
      {% set dismiss_attr = create_attribute()
        .setAttribute('id', 'sa-lb-section-dismiss')
        .setAttribute('data-bs-toggle', 'collapse')
        .setAttribute('data-bs-target', "#sa-lb-section")
        .setAttribute('aria-expanded', 'true')
      %}
      {% include "@atoms/tm-links/icon-bookended/icon-bookended.twig" with {
        "text": "Dismiss",
        "attr": dismiss_attr,
        "class": "belianu dismiss fr",
        "url": "#sa-lb-section",
        "icon_right": "fas fa-chevron-up",
      } only %}
    </div>

    <!-- Link items -->
    {% for link in links %}
      <div class="col-md-6 col-sm-6">
        {% include "@organisms/tm-sa/sa-block-top/sa-block-top.twig" with {
          "text": link['text'],
          "url": link['url'],
          "extra": link['extra'],
          "intro": link['intro'],
          "block_status": link['block_status'],
        } only %}
      </div>
    {% endfor %}
    <!-- / Link items -->

  </div>
{% endif %}
