<div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Serial No</th>
                <th>Position</th>
                <th>Terms & Condition</th>
                <th>Priority</th>
                <th class="thbutton">Status</th>
                <th class="thbutton">Default</th>
                {{-- @if(auth()->user()->can('enquiry-status-edit')) --}}
                <th class="thbutton">Edit</th>
                {{-- @endif) --}}
                {{-- @if(auth()->user()->can('enquiry-status-delete')) --}}
                <th class="thbutton">Delete</th>
                {{-- @endif) --}}
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td>{{ $data->firstItem() + $key }}</td>
                        <td>{!! ucfirst($list->position) !!}</td>
                        <td>{!! isset($list->terms_and_condition) ? \Str::limit(strip_tags($list->terms_and_condition), 35) : '' !!}</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('voucher-terms.changestatus')}}" data-id="{{$list->id}}" data-status="{{$list->status == '0' ? '1' : '0'}}" {{ $list->status == '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('voucher-terms.changedefault')}}" data-id="{{$list->id}}" data-status="{{$list->is_default == '0' ? '1' : '0'}}" {{ $list->is_default == '1' ? 'checked' : ''}}>
                            </div>
                        </td>
                        {{-- @if(auth()->user()->can('enquiry-status-edit')) --}}
                        <td>
                            <a href="{{route('voucher-terms.edit', $list->id)}}" class="btn btn-warning btn-outline-secondary" href="#" class="text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Edit">
                                <i class="bi bi-pencil-square text-white"></i>
                            </a>
                        </td>
                        {{-- @endif --}}
                        {{-- @if(auth()->user()->can('enquiry-status-delete')) --}}
                        <td>
                            <a data-url="{{route('voucher-terms.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>
                        {{-- @endif --}}
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
                <tr>
                    <td colspan="9">No Data Found</td>
                </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="float-start mt-2">
    <ul class="pagination">
        {!! $data->onEachSide(0)->render('enquiry-statuses.pagination') !!}
    </ul>
</nav>
</div>

