<div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Sl No</th>
                <th>Product Name</th>
                <th>Category</th>
                <th>Brand</th>
                <th>Tax</th>
                <th>MRP</th>
                <th>Sale Price</th>
                <th style="width: 10%">Status</th>
                <th class="thbutton">Delete</th>
            </tr>
        </thead>
        <tbody class="tablecontents">
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr style="cursor: move;" class="row1" data-id="{{ $list->id }}">
                        <td class="item_sno">{{$data->firstItem() + $key}}</td>
                        <td>{{ucfirst($list->product->name ?? '')}}</td>
                        <td>{{$list->product->getProductCategory->name ?? ''}}</td>
                        <td>{{$list->product->getProductBrand->name ?? ''}} </td>
                        <td>{{$list->product->getTaxMaster->name ?? ''}} </td>
                        <td>{{$list->product->getProductPrice->mrp ?? ''}} </td>
                        <td>{{$list->product->getProductPrice->sale_price ?? ''}} </td>
                        <td>
                            <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('plan-product-mapping.changestatus') }}" data-id="{{ $list->id }}" data-status="{{ $list->status == '0' ? '1' : '0' }}" {{ $list->status == '1' ? 'checked' : '' }}>
                            </div>
                        </td>
                        <td>
                            <a data-url="{{route('plan-product-mapping.destroy')}}" data-id="{{$list->id}}" class="btn btn-danger deleteDataCustom" href="#" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Delete">
                                <i class="bi bi-trash text-white"></i>
                            </a>
                        </td>
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
                <tr>
                    <td colspan="8">No Data Found</td>
                </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="float-start mt-2">
    <ul class="pagination">
        {!! $data->onEachSide(0)->render('product-feature-modules.pagination') !!}
    </ul>
</nav>
</div>

