{# LIBRARIES #}
{{ attach_library('ui_patterns/tweet_vert_scroller.tweet_vert_scroller_lib') }}

{# VARIABLES #}

{# TEMPLATE #}
{% if not no_wrapper %}
<div id="{{ block_id }}">
{% endif %}
{% if tweets|length %}

  <div class="tweets-vert-scroll">
  {% for tweet in tweets %}
    <div class="tweet {{ tweet.class }}">
      <div class="tweet-content">
        <p>{{ tweet.text|raw }}</p>
        <div class="footer">
          {% if tweet.handle_name %}
          {% include "@atoms/tm-links/standard/standard.twig" with {
            "text": tweet.handle_name,
            "url": tweet.handle_url
          } only %}
          {% endif %}
          <span><i>{{ tweet.timeago }}</i></span>
        </div>
      </div>
    </div>
  {% endfor %}
  </div>

{% else %}
  {{ no_results }}
{% endif %}
  <div class="tvs-bottom-section">
    {{ altcom_ajax_link(
      '<i class="fas fa-sync-alt"></i>',
      'twitter_api_block_simple_list_advance_loaded',
      block_id,
      {'block_id': block_id}, 1)
    }}
    {% if follow_text is not empty %}
    {% include "@atoms/tm-links/icon-bookended/icon-bookended.twig" with {
      "text": follow_text,
      "url": follow_url,
      "icon_right": global_icon_right|default('fas fa-chevron-right'),
      "display": "inline",
    } only %}
    {% endif %}
  </div>
{% if not no_wrapper %}
</div>
{% endif %}
