<div class="table-responsive">
    <table class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th>Sl No</th>
                <th>Language Name</th>
                <th>Language Code</th>
                <th class="thbutton">Website view</th>
                <th class="thbutton">Is Featured</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=> $row)
            <tr>
                <td>{{$data->firstItem() + $key}}</td>
                <td>{{$row->lang_name}}</td>
                <td>{{$row->lang_code}}</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('library.book-languages.changewebsiteview')}}" data-id="{{$row->id}}" data-status="{{$row->website_view=='0' ? '1' : '0'}}" {{ $row->website_view=='1' ? 'checked' : ''}}>
                    </div>

                </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('library.book-languages.changeisfeatured')}}" data-id="{{$row->id}}" data-status="{{$row->isfeatured=='0' ? '1' : '0'}}" {{ $row->isfeatured=='1' ? 'checked' : ''}}>
                    </div>

                </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('library.book-languages.changestatus')}}" data-id="{{$row->id}}" data-status="{{$row->status=='0' ? '1' : '0'}}" {{ $row->status=='1' ? 'checked' : ''}}>
                    </div>

                </td>
                <td align="center">
                    @if(in_array('library-lanuguages-edit', $authRolePermissions))
                    <a href="{{route('book-languages.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('library-lanuguages-delete', $authRolePermissions))
                    <a data-url="{{route('library.book-languages.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="8">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="float-start mt-2">
    <ul class="pagination">
        {!! $data->onEachSide(-1)->render('library-setting.book-languages.pagination') !!}
    </ul>
</nav>
</div>