{% load static wagtailcore_tags %}

{% with block.value.buttons.0.value.icon_side as icons_side %}
  {% if block.value.buttons|length > 1 %}
    <ul class="fr-btns-group fr-btns-group--inline-lg{% if icons_side == 'fr-btn--icon-left' %} fr-btns-group--icon-left{% elif icons_side == 'fr-btn--icon-right' %} fr-btns-group--icon-right {% endif %} {{ value.position }}">
      {% for button in block.value.buttons %}
        <li>{% include "sites_conformes_content_manager/blocks/button.html" with button=button.value %}</li>
      {% endfor %}
    </ul>
  {% else %}
    <div class="fr-btns-group fr-btns-group--inline-lg{% if icons_side == 'fr-btn--icon-left' %} fr-btns-group--icon-left{% elif icons_side == 'fr-btn--icon-right' %} fr-btns-group--icon-right {% endif %} {{ value.position }}">
      {% include "sites_conformes_content_manager/blocks/button.html" with button=block.value.buttons.0.value %}
    </div>
  {% endif %}
{% endwith %}
