<?php $__env->startSection('title', 'Edit course'); ?>

<?php $__env->startSection('content'); ?>
    <?php echo $__env->make('coach.partials.header', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

    <div class="mb-4 text-sm">
        <a href="<?php echo e(route('coach.courses.index', ['tenant' => $tenant, 'program_id' => $course->program_id])); ?>" class="text-teal-700 hover:underline">← Courses</a>
    </div>

    <h2 class="text-lg font-semibold">Edit course</h2>

    <form method="POST" action="<?php echo e(route('coach.courses.update', [$tenant, $course])); ?>" class="mt-6 space-y-4 rounded-2xl border border-stone-200 bg-white p-6 shadow-sm">
        <?php echo csrf_field(); ?>
        <?php echo method_field('PUT'); ?>
        <div>
            <label for="program_id" class="block text-sm font-medium text-stone-700">Program</label>
            <select id="program_id" name="program_id" required class="mt-1 w-full rounded-lg border border-stone-300 px-3 py-2 shadow-sm">
                <?php $__currentLoopData = \App\Models\Program::query()->where('tenant_id', $tenant->id)->orderBy('title')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $prog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($prog->id); ?>" <?php if(old('program_id', $course->program_id) == $prog->id): echo 'selected'; endif; ?>><?php echo e($prog->title); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
        </div>
        <?php echo $__env->make('coach.partials.course-fields', ['course' => $course], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
        <button type="submit" class="rounded-full bg-teal-600 px-5 py-2 text-sm font-medium text-white hover:bg-teal-700">Save</button>
    </form>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/nurudinwahablartey/Projects/lms/resources/views/coach/courses/edit.blade.php ENDPATH**/ ?>