  <?php
    $authCheck = auth()->check();
    $permission= auth()->user();
?>
 <table class="table table-striped">
                        <thead class="border-bottom">
                            <tr>
                                <th>S.No.</th>
                                <th>Image</th>
                                <th>Name</th>
                                <!-- <th>Status</th>  -->
                                <th>Actions</th> 
                            </tr>
                        </thead>
                       
                        <tbody>
                            <?php $__currentLoopData = $subjects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $subject): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($key + 1); ?></td>
                                 <td>
                                    

                                    <div class="d-flex align-items-center">
                                        <?php
                                            $iconPath = 'storage/subjects/' . $subject->icon;
                                            $iconUrl = (file_exists(public_path($iconPath)) && $subject->icon)
                                                        ? url($iconPath)
                                                        : asset('img/no-image.png');
                                        ?>
                                        <img src="<?php echo e($iconUrl); ?>"
                                            alt="Subject Icon"
                                            class="rounded-circle me-2"
                                            style="width: 80px; height: 80px; object-fit: cover;">
                                    </div>
                                </td>
                                <td><?php echo e($subject->name); ?></td>
                               
                                <!-- <td><?php echo e($subject->status == 1 ? 'Active' : 'Inactive'); ?></td> -->
                                 <!-- <td class="ms-2" id="statusLabel<?php echo e($subject->id); ?>">
                                    <?php echo e($subject->status == 1 ? 'Active' : 'Inactive'); ?>

                                 </td> -->
                                
                                <td class="">
                                    
                                <div class="d-flex align-items-center">
                                    <div class="lights">
                                        
                                            <!-- <input 
                                                class="form-check-input mt-0 change-status" 
                                                type="checkbox" 
                                                id="statusSwitch<?php echo e($subject->id); ?>" 
                                                name="statusSwitch" 
                                                value="1"
                                                data-id="<?php echo e(base64_encode($subject->id)); ?>"
                                                data-name="<?php echo e($subject->title); ?>"
                                                <?php echo e($subject->status == 1 ? 'checked' : ''); ?>

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

                                            </label> -->
                                    </div>
                                    
                                    <a href="<?php echo e(route('admin.subject.edit', base64_encode($subject->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> 
                                    
                                    <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($subject->id)); ?>">
                                            <i class="fa-solid fa-trash"></i>
                                    </a>
                                   
                                </div>
                                
                                </td>

                            </tr>


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

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