<div>
    <div class="card">
        <div class="card-header">
            <h4 class="card-title mb-0">My Termly Results</h4>
        </div>
        <div class="card-body">
            <!--[if BLOCK]><![endif]--><?php if($sessions->count() > 0): ?>
                <div class="table-responsive">
                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <th>Session</th>
                                <th>Status</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            <!--[if BLOCK]><![endif]--><?php $__currentLoopData = $sessions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $session): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($session->name); ?> (<?php echo e($session->start_year); ?>/<?php echo e($session->end_year); ?>)</td>
                                    <td>
                                        <span class="badge bg-success">Available</span>
                                    </td>
                                    <td>
                                        <button wire:click="viewResult(<?php echo e($session->id); ?>)" 
                                                class="btn btn-sm btn-primary me-2 my-1 d-none d-md-inline-block">
                                            <i class="fas fa-eye me-2"></i>View
                                        </button>
                                        <button wire:click="viewResult(<?php echo e($session->id); ?>)" 
                                                class="btn btn-xs btn-primary me-1 my-1 d-md-none">
                                            View
                                        </button>
                                        <a href="<?php echo e(route('student.results.print-termly', $session->slug)); ?>" 
                                           class="btn btn-sm btn-secondary my-1 d-none d-md-inline-block" 
                                           onclick="window.open(this.href, 'printResult', 'width=794,height=1123,scrollbars=yes,resizable=yes'); return false;">
                                            <i class="fas fa-print me-2"></i>Print
                                        </a>
                                        <a href="<?php echo e(route('student.results.print-termly', $session->slug)); ?>" 
                                           class="btn btn-xs btn-secondary my-1 d-md-none" 
                                           onclick="window.open(this.href, 'printResult', 'width=794,height=1123,scrollbars=yes,resizable=yes'); return false;">
                                            Print
                                        </a>
                                    </td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
                        </tbody>
                    </table>
                </div>
            <?php else: ?>
                <div class="text-center py-4">
                    <i class="fas fa-chart-line fa-3x text-muted mb-3"></i>
                    <h5>No Results Available</h5>
                    <p class="text-muted">Your termly results will appear here once they are approved.</p>
                </div>
            <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
        </div>
    </div>

    <!-- Result Modal -->
    <!--[if BLOCK]><![endif]--><?php if($showModal && $resultData): ?>
        <div class="modal fade show" style="display: block; background: rgba(0,0,0,0.5);" tabindex="-1">
            <div class="modal-dialog modal-xl modal-dialog-scrollable">
                <div class="modal-content">
                    <div class="modal-header bg-primary">
                        <h5 class="modal-title text-white"><?php echo e($resultData['session']->name); ?> Result</h5>
                        <button type="button" class="btn-close btn-close-white" wire:click="closeModal"></button>
                    </div>
                    <div class="modal-body">
                        <?php echo $__env->make('results.partials.student-result-content', ['data' => $resultData, 'qrCode' => $qrCode], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" wire:click="closeModal">Close</button>
                    </div>
                </div>
            </div>
        </div>
    <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</div><?php /**PATH C:\wamp64\www\edu-p\resources\views/livewire/student/student-termly-results.blade.php ENDPATH**/ ?>