<?php ($slot = $slot ?? null); ?>

<div style="display:grid; grid-template-columns: repeat(2, 1fr); gap:16px;">
    <div class="form-group">
        <label class="form-label" for="class_id">Class</label>
        <select class="input" id="class_id" name="class_id" required>
            <?php $__currentLoopData = $classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $class): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($class->id); ?>" <?php if(old('class_id', $slot?->class_id) == $class->id): echo 'selected'; endif; ?>><?php echo e($class->name); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
    <div class="form-group">
        <label class="form-label" for="subject_id">Subject</label>
        <select class="input" id="subject_id" name="subject_id" required>
            <?php $__currentLoopData = $subjects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $subject): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($subject->id); ?>" <?php if(old('subject_id', $slot?->subject_id) == $subject->id): echo 'selected'; endif; ?>><?php echo e($subject->name); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
    <div class="form-group">
        <label class="form-label" for="staff_id">Teacher</label>
        <select class="input" id="staff_id" name="staff_id">
            <option value="">—</option>
            <?php $__currentLoopData = $staffMembers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $member): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($member->id); ?>" <?php if(old('staff_id', $slot?->staff_id) == $member->id): echo 'selected'; endif; ?>><?php echo e($member->full_name); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
    <div class="form-group">
        <label class="form-label" for="day_of_week">Day</label>
        <select class="input" id="day_of_week" name="day_of_week" required>
            <?php $__currentLoopData = $days; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($value); ?>" <?php if(old('day_of_week', $slot?->day_of_week) == $value): echo 'selected'; endif; ?>><?php echo e($label); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
    <div class="form-group">
        <label class="form-label" for="starts_at">Starts</label>
        <input class="input" type="time" id="starts_at" name="starts_at" value="<?php echo e(old('starts_at', $slot ? substr($slot->starts_at, 0, 5) : '')); ?>" required>
    </div>
    <div class="form-group">
        <label class="form-label" for="ends_at">Ends</label>
        <input class="input" type="time" id="ends_at" name="ends_at" value="<?php echo e(old('ends_at', $slot ? substr($slot->ends_at, 0, 5) : '')); ?>" required>
    </div>
    <div class="form-group">
        <label class="form-label" for="room">Room</label>
        <input class="input" type="text" id="room" name="room" value="<?php echo e(old('room', $slot?->room)); ?>">
    </div>
    <div class="form-group">
        <label class="form-label" for="term_id">Term</label>
        <select class="input" id="term_id" name="term_id">
            <option value="">—</option>
            <?php $__currentLoopData = $terms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $term): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($term->id); ?>" <?php if(old('term_id', $slot?->term_id) == $term->id): echo 'selected'; endif; ?>><?php echo e($term->name); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </select>
    </div>
</div>
<?php /**PATH C:\laragon\www\southend\resources\views\admin\timetable\_form.blade.php ENDPATH**/ ?>