@if ($paginator->hasPages())
<nav class="adm-pagination" aria-label="Pagination">

    {{-- Prev --}}
    @if ($paginator->onFirstPage())
        <span class="page-item disabled">
            <span class="page-link"><i class="bi bi-chevron-left"></i></span>
        </span>
    @else
        <a class="page-item" href="{{ $paginator->previousPageUrl() }}" rel="prev">
            <span class="page-link"><i class="bi bi-chevron-left"></i></span>
        </a>
    @endif

    {{-- Pages --}}
    @foreach ($elements as $element)
        @if (is_string($element))
            <span class="page-item disabled"><span class="page-link">{{ $element }}</span></span>
        @endif
        @if (is_array($element))
            @foreach ($element as $page => $url)
                @if ($page == $paginator->currentPage())
                    <span class="page-item active" aria-current="page">
                        <span class="page-link">{{ $page }}</span>
                    </span>
                @else
                    <a class="page-item" href="{{ $url }}">
                        <span class="page-link">{{ $page }}</span>
                    </a>
                @endif
            @endforeach
        @endif
    @endforeach

    {{-- Next --}}
    @if ($paginator->hasMorePages())
        <a class="page-item" href="{{ $paginator->nextPageUrl() }}" rel="next">
            <span class="page-link"><i class="bi bi-chevron-right"></i></span>
        </a>
    @else
        <span class="page-item disabled">
            <span class="page-link"><i class="bi bi-chevron-right"></i></span>
        </span>
    @endif

</nav>
@endif
