{% load i18n %}
{% load comments_ink %}

{% with creactions=comment.get_reactions %}
  {% if creactions.counter > 0 %}
    <div class="active-reactions">
      {% for reaction in creactions.list %}
        {% if reaction.counter > 0 %}
          <div class="reaction" data-reaction="{{ reaction.value }}">
            {% if reaction.counter > max_users_in_tooltip %}<a href="{% url 'comments-ink-list-reacted' comment.id reaction.value %}" class="smaller">{{ reaction.counter }}</a>{% else %}<span class="smaller">{{ reaction.counter }}</span>{% endif %}<span class="emoji">&{{ reaction.icon }};</span>
            <div class="reaction_tooltip">{% if reaction.counter > reaction.authors|length %}{% blocktrans with authors=reaction.authors|join:", " label=reaction.label %}{{ authors }} and more reacted with {{ label }}{% endblocktrans %}{% elif reaction.counter == reaction.authors|length %}{% blocktrans with authors=reaction.authors|join:", " label=reaction.label %}{{ authors }} reacted with {{ label }}{% endblocktrans %}{% endif %}</div>
          </div>
        {% endif %}
      {% endfor %}
    </div>
  {% endif %}
{% endwith %}
