@php
    /** @var \Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator */
    $p = $paginator;
@endphp
@if ($p->hasPages())
    <div class="pagination-bar">
        <span class="pagination-meta">{{ __('clinic.page_info', ['current' => $p->currentPage(), 'last' => $p->lastPage()]) }}</span>
        <div class="pagination-nav">
            @if ($p->onFirstPage())
                <span class="btn btn-ghost btn-sm" style="opacity:0.45;pointer-events:none">{{ __('clinic.previous') }}</span>
            @else
                <a href="{{ $p->previousPageUrl() }}" class="btn btn-ghost btn-sm">{{ __('clinic.previous') }}</a>
            @endif
            @if ($p->hasMorePages())
                <a href="{{ $p->nextPageUrl() }}" class="btn btn-ghost btn-sm">{{ __('clinic.next') }}</a>
            @else
                <span class="btn btn-ghost btn-sm" style="opacity:0.45;pointer-events:none">{{ __('clinic.next') }}</span>
            @endif
        </div>
    </div>
@endif
