<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>Name</th>
                <th>Code</th>
                <th>Is Volumetric</th>
                <th>Divide By</th>
                <th>Round Up</th>
                <th>Priority</th>
                <th class="thbutton">Default</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($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td>{{$data->firstItem() + $key}}</td>
                        <td>{{$list->name}}</td>
                        <td>{{$list->code}}</td>
                        <td>{{$list->is_volumetric}}</td>
                        <td>{{$list->divide_by}}</td>
                        <td>{{$list->round_up}}</td>
                        <td>{{$list->priority}}</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('rate-calculation-type.changedefualt')}}" data-id="{{$list->id}}" data-status="{{$list->is_default=='0' ? '1' : '0'}}" {{ $list->is_default=='1' ? 'checked' : ''}}>
                            </div>
                        </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('rate-calculation-type.changestatus')}}" data-id="{{$list->id}}" data-status="{{$list->status=='0' ? '1' : '0'}}" {{ $list->status=='1' ? 'checked' : ''}}>
                            </div>
                        </td>
                    
                        <td>
                            <button data-id="{{ $list->id }}" class="btn btn-outline-secondary edit" data-bs-toggle="modal" data-bs-target="#commonModal" title="Edit">
                                <i class="bi bi-pencil-square"></i>
                            </button>
                        </td>
              
                        <td>
                            <a data-url="{{route('rate-calculation-type.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="5">No Data Found</td>
                </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="float-start mt-2">
    <ul class="pagination">
        {!! $data->onEachSide(0)->render('rate-calculation-type.pagination') !!}
    </ul>
</nav>
</div>

