@if ($paginator->hasPages())
    <div class="pagination">
        <ul>
            <li>
                @if ($paginator->onFirstPage())
                    <button class="td-pagination-prev">
                        <svg xmlns="http://www.w3.org/2000/svg" width="9" height="14" viewBox="0 0 9 14"
                            fill="none">
                            <path d="M8.12495 0.75L1.875 7.00005L8.125 13.25" stroke="#C4CDD5" stroke-width="1.875"
                                stroke-miterlimit="16" />
                        </svg>
                    </button>
                @else
                    <button class="td-pagination-prev" onclick="window.location='{{ $paginator->previousPageUrl() }}'">
                        <svg xmlns="http://www.w3.org/2000/svg" width="9" height="14" viewBox="0 0 9 14"
                            fill="none">
                            <path d="M8.12495 0.75L1.875 7.00005L8.125 13.25" stroke="#C4CDD5" stroke-width="1.875"
                                stroke-miterlimit="16" />
                        </svg>
                    </button>
                @endif
            </li>
            @foreach ($elements as $element)
                @if (is_array($element))
                    @foreach ($element as $page => $url)
                        <li>
                            <button class="{{ $page == $paginator->currentPage() ? 'active-btn' : '' }}"
                                onclick="window.location='{{ $url }}'">
                                {{ $page }}
                            </button>
                        </li>
                    @endforeach
                @endif
            @endforeach
            <li>
                @if ($paginator->hasMorePages())
                    <button class="td-pagination-next" onclick="window.location='{{ $paginator->nextPageUrl() }}'">
                        <svg xmlns="http://www.w3.org/2000/svg" width="9" height="14" viewBox="0 0 9 14"
                            fill="none">
                            <path d="M0.875049 0.75L7.125 7.00005L0.875 13.25" stroke="#666666" stroke-width="1.875"
                                stroke-miterlimit="16" />
                        </svg>
                    </button>
                @else
                    <button class="td-pagination-next disabled">
                        <svg xmlns="http://www.w3.org/2000/svg" width="9" height="14" viewBox="0 0 9 14"
                            fill="none">
                            <path d="M0.875049 0.75L7.125 7.00005L0.875 13.25" stroke="#666666" stroke-width="1.875"
                                stroke-miterlimit="16" />
                        </svg>
                    </button>
                @endif
            </li>
        </ul>
    </div>
@endif
