{% load i18n static ui %}

{% for association in associations %}
  <div class="col col-12 col-md-6 col-lg-4 col-xl-3 mb-3" data-association="{{ association.pk }}">
    {% include 'ui/associations/partials/association_card.html' with association=association %}
  </div>
{% empty %}
  {% if not HTMX %}
    <div class="col col-12 mb-4 text-center">
      <p class="display-4">¯\_(ツ)_/¯</p>
      {% if params.before is None %}
        <p>{% translate "It's empty. Too empty..." %}</p>
        {% if params.mode == 'DEFAULT' %}
          <p class="mb-0">
            <a
              class="btn btn-primary"
              href="{% url 'ui.saves.create' %}"
            >
              <i class="bi bi-plus"></i> {% translate 'Save a link' %}
            </a>
          </p>
        {% endif %}
      {% else %}
        <p class="mb-0">{% translate "You've reached the end of the line." %}</p>
      {% endif %}
    </div>
  {% endif %}
{% endfor %}
