<?php $__env->startSection('title', 'Single courses'); ?>

<?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 flex flex-wrap items-center justify-between gap-3">
        <p class="max-w-2xl text-sm text-stone-600">These courses are <strong>not</strong> inside a program. Use them for one-off offers or quick curricula.</p>
        <a href="<?php echo e(route('coach.courses.standalone.create', $tenant)); ?>" class="rounded-full bg-teal-600 px-4 py-2 text-sm font-medium text-white hover:bg-teal-700">New single course</a>
    </div>

    <ul class="divide-y divide-stone-200 rounded-2xl border border-stone-200 bg-white shadow-sm">
        <?php $__empty_1 = true; $__currentLoopData = $courses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $course): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <li class="flex flex-wrap items-center justify-between gap-3 px-4 py-3">
                <div>
                    <span class="font-medium text-stone-900"><?php echo e($course->title); ?></span>
                    <span class="ml-2 text-xs text-stone-500"><?php echo e($course->slug); ?></span>
                    <span class="ml-2 text-xs <?php echo e($course->is_published ? 'text-teal-700' : 'text-stone-400'); ?>"><?php echo e($course->is_published ? 'Published' : 'Draft'); ?></span>
                </div>
                <div class="flex flex-wrap gap-2 text-sm">
                    <a href="<?php echo e(route('coach.modules.index', ['tenant' => $tenant, 'course_id' => $course->id])); ?>" class="text-teal-700 hover:underline">Modules</a>
                    <a href="<?php echo e(route('coach.lessons.index', ['tenant' => $tenant, 'course_id' => $course->id])); ?>" class="text-teal-700 hover:underline">Course lessons</a>
                    <a href="<?php echo e(route('coach.courses.edit', [$tenant, $course])); ?>" class="text-teal-700 hover:underline">Edit</a>
                    <form method="POST" action="<?php echo e(route('coach.courses.destroy', [$tenant, $course])); ?>" class="inline" onsubmit="return confirm('Delete this course and nested modules?');">
                        <?php echo csrf_field(); ?>
                        <?php echo method_field('DELETE'); ?>
                        <button type="submit" class="text-red-600 hover:underline">Delete</button>
                    </form>
                </div>
            </li>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <li class="px-4 py-8 text-center text-sm text-stone-500">No standalone courses yet.</li>
        <?php endif; ?>
    </ul>
<?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/standalone-index.blade.php ENDPATH**/ ?>