{# note - this partial needs more work, and was thrown out to fast #}
{% set global_icon_tag = global_icon_tag|default("fas fa-tag") %}
{% if visible_limit %}
  {{ attach_library('ui_patterns/card_tags.card_tags_visible_lib') }}
  {% set hidden_class = '' %}
  {% set hidden_tags_count = tags|length - visible_limit %}
{% endif %}
{% if tags %}
  <ul class="ulc card-tags">
    {% for tag in tags %}
      {% if visible_limit and loop.index > visible_limit %}
        {% set hidden_class = " d-none" %}
      {% endif %}
      <li class="liin{{ hidden_class }}">
        {% include "@atoms/tm-links/icon-bookended/icon-bookended.twig" with {
          "text": tag.name,
          "url": tag.url,
          "icon_left": no_icon ? "" : global_icon_tag,
          "class": "tag",
          "attr": tag.attr ? tag.attr : false,
          "display": display,
        } only %}
      </li>
    {% endfor %}
    {% if hidden_tags_count > 0 %}
      <li class="liin">
        <button class="btn btn-default tag plus-button">+{{ hidden_tags_count }}</button>
      </li>

    {% endif %}
  </ul>
{% endif %}
