{% from '@openform_front_templates/_includes/_icons.html.twig' import sliderprev, slidernext %}
{% set pages = pages is defined ? pages : 1 %}
{% if pages > 1 %}
<nav role="navigation" class="pagination js-pagination" data-pages="{{ pages }}">
<ul>
<li>
<button type="button" class="js-pagination-prev slider-nav__btn slider-nav__btn--prev hide">{{ sliderprev('PREV'|trans) }}</button>
</li>
{% for i in 1.. pages %}
<li>
<button type="button" class="pagination__item js-pagination-numbers {{ i == 1 ? 'active' }}" data-value="{{ i }}" aria-label=" Page {{ i }}">
{{ i }}
</button>
</li>
{% endfor %}
<li>
<button type="button" class="js-pagination-next slider-nav__btn slider-nav__btn--next">{{ slidernext('NEXT'|trans) }}</button>
</li>
</ul>
</nav>
{% endif %}