<div class="table-responsive">
    <table class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Sl No</th>
                <th>Plan Name</th>
                <th>Book Limit</th>
                <th>Book Validity</th>
                <th>Priority</th>
                <th>Fees Plan</th>
                <th>Details</th>
                <th class="thbutton">Status</th>
                <th class="thbutton">Edit</th>
                <th class="thbutton">Delete</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($MembershipPlan)>0)
            @foreach($MembershipPlan as $key=> $row)
            <tr>
                <td>{{$MembershipPlan->firstItem() + $key}}</td>
                <td>{{$row->name}}</td>
                <td>{{$row->book_limit}}</td>
                <td>{{$row->book_validity}}</td>
                <td>{{$row->priority}}</td>
                <td>{{$row->fees_plan}}</td>
                <td>{{$row->details}}</td>
                <td align="center">
                    <div class="form-check form-check-inline{{$i}}">
                        <input class="form-check-input{{$i}} btn-lg changeStatusCustom" type="checkbox" id="inlineCheckbox{{$i}}" data-url="{{route('membership-plan.changestatus')}}" data-id="{{$row->id}}" data-status="{{$row->status=='0' ? '1' : '0'}}" {{ $row->status=='1' ? 'checked' : ''}}>
                    </div>
                </td>
                <td align="center">
                    @if(in_array('membership-plan-edit', $authRolePermissions))
                    <a href="{{route('membership-plan.edit',$row->id)}}" class="btn btn-outline-secondary edit" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Edit">
                        <i class="bi bi-pencil-square"></i>
                    </a>
                    @endif
                </td>
                <td align="center">
                    @if(in_array('membership-plan-delete', $authRolePermissions))
                    <a data-url="{{route('library.membership-plan.destroy')}}" data-id="{{$row->id}}" class="btn btn-danger deleteDataCustom" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                        <i class="bi bi-trash text-white"></i>
                    </a>
                    @endif
                </td>

            </tr>
            @php $i++; @endphp
            @endforeach
            @else
            <tr>
                <td colspan="10">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<div class="table-responsive">
    <nav class="float-start mt-2">
        <ul class="pagination">
            {!! $MembershipPlan->onEachSide(-1)->render('library-setting.membership-plan.pagination') !!}
        </ul>
    </nav>
</div>
</div>