{#
/**
 * @file
 * Default theme implementation of followers counter.
 *
 * Available variables:
 * - flag: The flag object.
 * - flaggable: The flaggable entity.
 * - url: The url of the followers page.
 *
 * @see template_preprocess_followers()
 *
 * @ingroup themeable
 */
#}

{{ attach_library('social_follow_user/counter') }}

{% set count = flagcount(flag, flaggable) %}

<span class="badge__container">
  {% if url %}<a href="{{ url }}">{% endif %}
    <span class="badge__label">{{ count }}</span>
    <span class="badge__label badge__label--description">
      {% trans %}follower{% plural count %}followers{% endtrans %}
    </span>
  {% if url %}</a>{% endif %}
</span>
