{% if pages.pageCount > 1 %}
<div class="pagination-btn-group">
{# Go to previous page #}
{% if pages.current > 1 %}
<a class="pagination-btn pagination-btn--prev" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.startPage})) }}" aria-label="First">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.74659 8.0006L11.4034 13.6575L13.2891 11.7718L9.51783 8.0006L13.2891 4.22937L11.4034 2.34375L5.74659 8.0006Z" fill="#00A854"/>
<rect width="1.91077" height="11.043" transform="matrix(-1 0 0 1 4.89648 2.47656)" fill="#00A854"/>
</svg>
</a>
{% else %}
<span class="pagination-btn pagination-btn--prev is-disabled" aria-hidden="true">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.74659 8.0006L11.4034 13.6575L13.2891 11.7718L9.51783 8.0006L13.2891 4.22937L11.4034 2.34375L5.74659 8.0006Z" fill="#00A854"/>
<rect width="1.91077" height="11.043" transform="matrix(-1 0 0 1 4.89648 2.47656)" fill="#00A854"/>
</svg>
</span>
{% endif %}
{% if pages.previous is defined %}
<a class="pagination-btn pagination-btn--prev" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.previous})) }}" aria-label="Previous">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.44581 8.0006L9.10266 13.6575L10.9883 11.7718L7.21705 8.0006L10.9883 4.22937L9.10266 2.34375L3.44581 8.0006Z" fill="#00A854"/>
</svg>
</a>
{% else %}
<span class="pagination-btn pagination-btn--prev is-disabled" aria-hidden="true">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.44581 8.0006L9.10266 13.6575L10.9883 11.7718L7.21705 8.0006L10.9883 4.22937L9.10266 2.34375L3.44581 8.0006Z" fill="#00A854"/>
</svg>
</span>
{% endif %}
</div>
{# Page numbers - desktop #}
<div class="pagination-numbers container-desktop-flex">
{% for page in pages.pagesInRange %}
{% set href = path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) %}
{% if page == pages.current %}
<span class="pagination-number pagination-number--active">{{ page }}</span>
{% else %}
<a class="pagination-number" href="{{ href }}">{{ page }}</a>
{% endif %}
{% endfor %}
</div>
{# Mobile current/total #}
<div class="pagination-page-number container-mobile">
{{ pages.current }}/{{ pages.pageCount }}
</div>
<div class="pagination-btn-group">
{# Go to next page #}
{% if pages.next is defined %}
<a class="pagination-btn pagination-btn--next" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.next})) }}" aria-label="Next">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.5542 8.0006L6.89734 13.6575L5.01172 11.7718L8.78295 8.0006L5.01172 4.22937L6.89734 2.34375L12.5542 8.0006Z" fill="#00A854"/>
</svg>
</a>
{% else %}
<span class="pagination-btn pagination-btn--next is-disabled" aria-hidden="true">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.5542 8.0006L6.89734 13.6575L5.01172 11.7718L8.78295 8.0006L5.01172 4.22937L6.89734 2.34375L12.5542 8.0006Z" fill="#00A854"/>
</svg>
</span>
{% endif %}
{# Last page button (double arrow) #}
{% if pages.current < pages.pageCount %}
<a class="pagination-btn pagination-btn--next" href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.pageCount})) }}" aria-label="Last">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.2534 8.0006L4.59656 13.6575L2.71094 11.7718L6.48217 8.0006L2.71094 4.22937L4.59656 2.34375L10.2534 8.0006Z" fill="#00A854"/>
<rect x="11.1035" y="2.47656" width="1.91077" height="11.043" fill="#00A854"/>
</svg>
</a>
{% else %}
<span class="pagination-btn pagination-btn--next is-disabled" aria-hidden="true">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.2534 8.0006L4.59656 13.6575L2.71094 11.7718L6.48217 8.0006L2.71094 4.22937L4.59656 2.34375L10.2534 8.0006Z" fill="#00A854"/>
<rect x="11.1035" y="2.47656" width="1.91077" height="11.043" fill="#00A854"/>
</svg>
</span>
{% endif %}
</div>
{% endif %}