@php
    $authCheck = auth()->check();
    $permission= auth()->user();
@endphp
<table class="table table-striped">
                        <thead class="border-bottom">
                            <tr>
                                <th>S.No.</th>
                                <th>Role</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                        @foreach($roles as $key => $role)
                            <tr>
                                {{-- <td>{{ $key + 1 }}</td> --}}
                                  <td>{{ $roles->firstItem() + $key }}</td>
                                <td>{{ $role->name }}</td>
                                
                                <td class="d-flex align-items-center">
                                    <!-- <div class="lights">
                                        <div class="form-check form-switch mb-0 h-100">
                                            <input class="form-check-input mt-0" type="checkbox" id="mySwitch" name="darkmode" value="yes">
                                        </div>
                                    </div>  -->
                                    <a href="{{ route('admin.roles.edit', $role->id) }}" class="text-success me-3" data-bs-toggle="tooltip" data-bs-placement="top" title="Edit"><i class="fa-solid fa-pen-to-square"></i></a>
                                    {{-- <form action="{{ route('admin.roles.destroy', $role->id) }}" method="POST" class="d-inline">
                                        @csrf
                                        @method('DELETE')
                                        <a href="#" class="text-danger me-2" data-bs-toggle="modal" onclick="return confirm('Are you sure?')" data-bs-target="#myModal1" data-bs-toggle="tooltip" data-bs-placement="top" title="Delete"><i class="fa-solid fa-trash"></i></a>
                                    </form> --}}
                                    <a href="javascript:void(0);" 
                                        class="text-danger me-2 delete-btn" 
                                        data-bs-toggle="tooltip" data-bs-placement="top" title="Delete"
                                        data-id="{{ base64_encode($role->id) }}">
                                            <i class="fa-solid fa-trash"></i>
                                    </a>
                                      <a href="view-student-details.html" class="text-info"></a>
                                </td>
                            </tr>
                        @endforeach
                        </tbody>
                    </table>
                    <div class="pagination-wrapper mb-4">
                        {{ $roles->links() }}
                    </div>