 <?php
    $authCheck = auth()->check();
    $permission= auth()->user();
?>
 <table class="table table-striped">
                        <thead class="border-bottom">
                            <tr>
                                <th>S.No.</th>
                                <th>Name</th>
                                <th>Status</th> 
                                <th>Actions</th> 
                            </tr>
                        </thead>
                       
                        <tbody>
                            <?php $__currentLoopData = $faqcategory; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($key + 1); ?></td>
                                <td><?php echo e($category->name); ?></td>
                                <!-- <td><?php echo e($category->status == 1 ? 'Active' : 'Inactive'); ?></td> -->
                                 <td class="ms-2" id="statusLabel<?php echo e($category->id); ?>">
                                    <?php echo e($category->status == 1 ? 'Active' : 'Inactive'); ?>

                                 </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 change-status" 
                                                data-bs-toggle="tooltip" data-bs-placement="top" title="Status"
                                                type="checkbox" 
                                                id="statusSwitch<?php echo e($category->id); ?>" 
                                                name="statusSwitch" 
                                                value="1"
                                                data-id="<?php echo e(base64_encode($category->id)); ?>"
                                                data-name="<?php echo e($category->title); ?>"
                                                <?php echo e($category->status == 1 ? 'checked' : ''); ?>

                                            >
                                             <!-- <label class="ms-2" id="statusLabel<?php echo e($category->id); ?>">
                                                <?php echo e($category->status == 1 ? 'Active' : 'Inactive'); ?>

                                            </label> -->
                                           
                                        </div>
                                    </div>
                                    <?php if($authCheck && $permission->hasPermission('faqcategory-edit')): ?>
                                    <a href="<?php echo e(route('admin.faqcategory.edit', base64_encode($category->id))); ?>" class="text-success me-2" data-bs-toggle="tooltip" data-bs-placement="top" title="Edit">
                                        <i class="fa-solid fa-pen-to-square"></i>
                                    </a> 
                                    <?php endif; ?>
                                    
                                    <?php if($authCheck && $permission->hasPermission('faqcategory-delete')): ?>
                                    <a href="javascript:void(0);" 
                                        class="text-danger me-2 delete-btn" 
                                        data-bs-toggle="tooltip" data-bs-placement="top" title="Delete"
                                        data-id="<?php echo e(base64_encode($category->id)); ?>">
                                            <i class="fa-solid fa-trash"></i>
                                    </a>
                                    <?php endif; ?>
                                 
                                </td>

                              
                            </tr>


                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                          
                        </tbody>
                    </table>
                    <div class="pagination-wrapper mb-4">
                        <?php echo e($faqcategory->links()); ?>

                    </div><?php /**PATH /var/www/html/quikwise-admin/resources/views/admin/faq-category/ajax.blade.php ENDPATH**/ ?>