@if ($paginator->hasPages())
<div class="col-12">
    <ul class="pagination float-end p-0">
        @if($paginator->onFirstPage())
        <li class="page-item"><a class="page-link" style="cursor:auto;" aria-label="Previous"><i class="bi bi-caret-left"></i></a></li>

        @else
        <li class="page-item"><a class="page-link" href="{{$paginator->previousPageUrl()}}" aria-label="Previous"><i class="bi bi-caret-left"></i></a></li>
        @endif


        @foreach($elements as $element)
        @if(is_array($element))
        @foreach ($element as $page => $url)
        @if($page == $paginator->currentPage())
        <li class="page-item active"><a class="page-link" href="{{$url}}" style="background-color: #9d9494dd; border: none;">{{$page}}</a></li>
        @else
        <li class="page-item"><a class="page-link" href="{{$url}}">{{$page}}</a></li>
        @endif
        @endforeach
        @else
        <li class="page-item"><span class="page-link" style="background-color: transparent; font-weight:bold;">{{$element}}</span></li>
        @endif
        @endforeach

        @if($paginator->hasMorePages())
        <li class="page-item"><a class="page-link" href="{{$paginator->nextPageUrl()}}" aria-label="Next"><i class="bi bi-caret-right"></i></a></li>
        @else
        <li class="page-item"><a class="page-link" style="cursor: auto;" aria-label="Next"><i class="bi bi-caret-right"></i></a></li>
        @endif
    </ul>
</div>
@endif