<?php $__env->startSection('title', 'Timetable'); ?>
<?php $__env->startSection('page-title', 'My Timetable'); ?>
<?php $__env->startSection('sidebar-nav'); ?>
<div class="nav-item"><a href="<?php echo e(route('teacher.dashboard')); ?>"><i class="bi bi-grid"></i> Dashboard</a></div>
<div class="nav-item"><a href="<?php echo e(route('teacher.timetable')); ?>"><i class="bi bi-calendar3"></i> Timetable</a></div>
<div class="nav-item"><a href="<?php echo e(route('teacher.marks')); ?>"><i class="bi bi-pencil-square"></i> Enter Marks</a></div>
<div class="nav-item"><a href="<?php echo e(route('teacher.attendance')); ?>"><i class="bi bi-calendar-check"></i> Attendance</a></div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="page-header"><div><h1>My Timetable</h1></div></div>

<?php $days = [1=>'Monday',2=>'Tuesday',3=>'Wednesday',4=>'Thursday',5=>'Friday']; ?>

<div class="card">
    <div class="table-wrap">
        <table>
            <thead>
                <tr><th>Day</th><th>Time</th><th>Subject</th><th>Stream</th><th>Room</th></tr>
            </thead>
            <tbody>
                <?php $__empty_1 = true; $__currentLoopData = $timetable; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $day => $slots): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php $__currentLoopData = $slots; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $slot): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <?php if($i === 0): ?>
                        <td rowspan="<?php echo e($slots->count()); ?>" style="font-weight:700;background:var(--primary-light);color:var(--primary);">
                            <?php echo e($days[$day] ?? $day); ?>

                        </td>
                        <?php endif; ?>
                        <td><?php echo e(\Carbon\Carbon::parse($slot->start_time)->format('H:i')); ?> - <?php echo e(\Carbon\Carbon::parse($slot->end_time)->format('H:i')); ?></td>
                        <td><strong><?php echo e($slot->subject->name); ?></strong></td>
                        <td><?php echo e($slot->stream->schoolClass->name); ?> <?php echo e($slot->stream->name); ?></td>
                        <td><?php echo e($slot->room ?? '-'); ?></td>
                    </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="5" style="text-align:center;padding:40px;color:var(--gray);">No timetable assigned yet</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\cbe\resources\views\teacher\timetable.blade.php ENDPATH**/ ?>