<div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                @php $i=1; @endphp
                <th>Serial No.</th>
                <th>Vehicle No</th>
                <th>Model</th>
                <th >Manufacture </th>
                <th >Ownership </th>
                <th >Vehicle Type</th>
                <th > Capacity</th> 
                <th class="thbutton">Edit</th>
                <th class="thbutton">Delete</th>
            </tr>
        </thead>
        <tbody>
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                <tr>
                         <td>{{$i++}}</td>
                        <td>{{$list->vehicle_no}}</td>
                        <td>{{$list->vehicle_model}}</td>
                        <td>{{$list->manufacture_year}}</td>
                        <td>{{($list->ownership_type)}}</td>
                        <td>{{$list->vehicle_type}}</td>
                        <td>{{$list->vehicle_capacity}}</td>
                        <td class="text-center">
                            <button data-id="{{ $list->id }}" class="btn btn-warning edit" data-bs-toggle="modal" data-bs-target="#commonModal" title="Edit">
                                <i class="bi bi-pencil-square text-white"></i>
                            </button>
                        </td>

                        <td class="text-center">
                            <a data-url="{{route('vehicle-register.destroy' , $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>
                @endforeach
            @else
                <tr>
                    <td colspan="9">No Data Found</td>
                </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="row align-items-center mt-3">
    <div class="col-md-7">
        {!! $data->onEachSide(0)->render('vehicles.import-pagination') !!}
    </div>
    <div class="col-md-5" style="display: flex; justify-content: end;">
        <div class="btn-group mb-0" style=" margin-left: 194px;">
            <a href="{{route('vehicle-register-import.modal')}}" class="btn btn-outline-primary"><i class="bx bx-upload"></i>
                Import Vehicles From Excel</a>
        </div>
    </div>
</nav>
</div>

