<div class="table-responsive">
  <table class="table table-bordered align-middle" style="width:100%">
      <thead class="table-light">
          <tr>
              <th class="thbutton">Sl No</th>
              <th>Tag Name</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->tag_name}}</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.library-tags.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-tags-edit', $authRolePermissions))
                    <a data-id="{!! $row->id !!}" id="edit"  data-bs-toggle="modal" data-bs-target="#commonModal" 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-tags-delete', $authRolePermissions))
                    <a data-url="{{route('library.library-tags.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.tags.pagination') !!}
    </ul>
</nav>
</div>

