{#
/**
 * @file
 * Theme override for a views mini-pager.
 *
 * Available variables:
 * - heading_id: Pagination heading ID.
 * - items: List of pager items.
 *
 * @see template_preprocess_views_mini_pager()
 */
#}

{{ attach_library('belgrade/mini-pager') }}

{% if items.previous or items.next %}
  <nav class="mini-pager" role="navigation" aria-labelledby="{{ heading_id }}">
    <h4 id="{{ heading_id }}" class="visually-hidden">{{ 'Pagination'|t }}</h4>
    <ul class="js-pager__items pagination">
      <li class="page-item {% if not items.previous %}disabled{% endif %}">
        <a href="{{ items.previous.href }}" class="page-link" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}>
          <span>{{ ('Previous page'|t) }}</span>
        </a>
      </li>
      {% if items.current %}
        <li class="page-item">
          <span class="page-link">{{ items.current }}</span>
        </li>
      {% endif %}
      <li class="page-item {% if not items.next %}disabled{% endif %}">
        <a href="{{ items.next.href }}" class="page-link" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}>
          <span>{{ ('Next page'|t) }}</span>
        </a>
      </li>
    </ul>
  </nav>
{% endif %}
