@if ($paginator->hasPages())
    <nav role="navigation" aria-label="分页导航" class="adm-pagination">
        <div class="adm-pagination-inner">
            {{-- Previous Page Link --}}
            @if ($paginator->onFirstPage())
                <span class="adm-page-btn is-disabled" aria-disabled="true">上一页</span>
            @else
                <a class="adm-page-btn" href="{{ $paginator->previousPageUrl() }}" rel="prev">上一页</a>
            @endif

            {{-- Pagination Elements --}}
            <div class="adm-page-list">
                @foreach ($elements as $element)
                    {{-- "Three Dots" Separator --}}
                    @if (is_string($element))
                        <span class="adm-page-ellipsis">{{ $element }}</span>
                    @endif

                    {{-- Array Of Links --}}
                    @if (is_array($element))
                        @foreach ($element as $page => $url)
                            @if ($page == $paginator->currentPage())
                                <span class="adm-page-num is-active" aria-current="page">{{ $page }}</span>
                            @else
                                <a class="adm-page-num" href="{{ $url }}">{{ $page }}</a>
                            @endif
                        @endforeach
                    @endif
                @endforeach
            </div>

            {{-- Next Page Link --}}
            @if ($paginator->hasMorePages())
                <a class="adm-page-btn" href="{{ $paginator->nextPageUrl() }}" rel="next">下一页</a>
            @else
                <span class="adm-page-btn is-disabled" aria-disabled="true">下一页</span>
            @endif

            <div class="adm-page-meta">
                <span class="muted muted-xs">第 {{ $paginator->currentPage() }} / {{ $paginator->lastPage() }} 页</span>
            </div>
        </div>
    </nav>
@endif
