<?php $__empty_1 = true; $__currentLoopData = $questions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $question): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr class="<?php echo e($i % 2 === 0 ? 'bg-white' : 'bg-gray-50/50'); ?> hover:bg-indigo-50/30 transition">

    
    <td class="px-4 py-3 text-gray-400 text-xs font-medium">
        <?php echo e($questions->firstItem() + $i); ?>

    </td>

    
    <td class="px-4 py-3">
        <p class="text-sm text-gray-800 leading-snug"><?php echo e(Str::limit($question->question_text, 80)); ?></p>
    </td>

    
    <td class="px-4 py-3">
        <?php if($question->course): ?>
            <span class="inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-700">
                <i class="fas fa-book text-xs"></i>
                <?php echo e(Str::limit($question->course->title, 35)); ?>

            </span>
        <?php else: ?>
            <span class="text-gray-300 text-xs">—</span>
        <?php endif; ?>
    </td>

    
    <td class="px-4 py-3">
        <?php
            $answerColors = ['A' => 'bg-green-100 text-green-700', 'B' => 'bg-blue-100 text-blue-700', 'C' => 'bg-purple-100 text-purple-700', 'D' => 'bg-amber-100 text-amber-700'];
            $colorClass = $answerColors[$question->correct_answer] ?? 'bg-gray-100 text-gray-600';
        ?>
        <span class="inline-flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold <?php echo e($colorClass); ?>">
            <?php echo e($question->correct_answer); ?>

        </span>
    </td>

    
    <td class="px-4 py-3">
        <?php if($question->is_active): ?>
            <span class="inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-700">
                <i class="fas fa-check text-xs"></i> Yes
            </span>
        <?php else: ?>
            <span class="inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-500">
                <i class="fas fa-times text-xs"></i> No
            </span>
        <?php endif; ?>
    </td>

    
    <td class="px-4 py-3">
        <div class="flex items-center gap-1">
            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('manage self-paced exams')): ?>
            <a href="<?php echo e(route('self-paced.dashboard.exams.edit', [$question->course, $question])); ?>"
               title="Edit"
               class="w-7 h-7 flex items-center justify-center rounded-lg bg-amber-50 hover:bg-amber-100 text-amber-600 transition">
                <i class="fas fa-pencil text-xs"></i>
            </a>
            <button type="button"
                    title="Delete"
                    onclick="confirmExamDelete(<?php echo e($question->id); ?>, '<?php echo e(addslashes(Str::limit($question->question_text, 50))); ?>')"
                    class="w-7 h-7 flex items-center justify-center rounded-lg bg-red-50 hover:bg-red-100 text-red-600 transition">
                <i class="fas fa-trash text-xs"></i>
            </button>
            <form id="delete-exam-form-<?php echo e($question->id); ?>"
                  action="<?php echo e(route('self-paced.dashboard.exams.destroy', [$question->course, $question])); ?>"
                  method="POST" class="hidden">
                <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
            </form>
            <?php endif; ?>
        </div>
    </td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<tr>
    <td colspan="6" class="px-6 py-16 text-center">
        <i class="fas fa-clipboard-question text-5xl text-gray-200 mb-4 block"></i>
        <p class="text-gray-400 font-medium">No questions found</p>
        <p class="text-gray-300 text-sm mt-1">Try adjusting your search or filters.</p>
    </td>
</tr>
<?php endif; ?>
<?php /**PATH /home/www/sshia.org/sshia/resources/views/self-paced/dashboard/exams/partials/table.blade.php ENDPATH**/ ?>