{% if pagination and pagination.total > 1 %}
    <nav class="pagination-block d-flex justify-content-center" aria-label="Paginación de artículos">
        <ul class="pagination">

            {# First #}
            {% if (pagination.pages|first) and pagination.pages|first.current != true %}
                <li class="first mx-2 border border-0">
                    <a href="{{ pagination.pages|first.link }}" 
                        class="text-decoration-none btn-primary-cnt btn-pagination-position btn-page-hover">
                        {{ __('Inicio', 'Sindikatua') }}
                    </a>
                </li>
            {% else %}
                <li class="first disabled mx-2 border border-0" >
                    <button disabled class="btn-disabled-cnt btn-pagination-position btn-no-hover bg-danger-subtle">
                        {{ __('Inicio', 'Sindikatua') }}
                    </button>
                </li>
            {% endif %}

            {# Previous #}
            {% if pagination.prev %}
                <li class="prev mx-2 border border-0">
                    <a href="{{ pagination.prev.link }}" 
                        class="text-decoration-none btn-primary-cnt btn-pagination-position btn-page-hover">
                        {{ __('Anterior', 'Sindikatua') }}
                    </a>
                </li>
            {% else %}
                <li class="prev disabled mx-2 border border-0">
                    <button disabled class="btn-disabled-cnt btn-pagination-position btn-no-hover bg-danger-subtle">
                        {{ __('Anterior', 'Sindikatua') }}
                    </button>
                </li>           
            {% endif %}
            
            {# Pages #}
            {% include 'partials/pagination-custom-pages.twig' %}
            
            {# Next #}
            {% if pagination.next %}
                <li class="next mx-2 border border-0">
                    <a href="{{ pagination.next.link }}" 
                        class="text-decoration-none btn-primary-cnt btn-pagination-position btn-page-hover">
                        {{ __('Siguiente', 'Sindikatua') }}
                    </a>
                </li>
            {% else %}
                <li class="next disabled mx-2 border border-0">
                    <button disabled class="btn-disabled-cnt btn-pagination-position btn-no-hover bg-danger-subtle">
                        {{ __('Siguiente', 'Sindikatua') }}
                    </button>
                </li>
            {% endif %}

            {# Last #}
            {% if (pagination.pages|last) and pagination.pages|last.current != true %}
                <li class="last mx-2 border border-0">
                    <a href="{{ pagination.pages|last.link }}" 
                        class="text-decoration-none btn-primary-cnt btn-pagination-position btn-page-hover">
                        {{ __('Última', 'Sindikatua') }}
                    </a>
                </li>
            {% else %}
                <li class="last disabled mx-2 border border-0">
                    <button disabled 
                        class="btn-disabled-cnt btn-pagination-position btn-no-hover bg-danger-subtle">
                        {{ __('Última', 'Sindikatua') }}
                    </button>
                </li>
            {% endif %}
        </ul>
    </nav>
{% endif %}
