<?php $__env->startSection('title', $tenant->name.' — reflections'); ?>

<?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="text-sm text-stone-600">Publish now or <strong>schedule</strong> (default 7:00 app time). Scheduled posts need <code class="rounded bg-stone-100 px-1 text-xs">schedule:work</code> or cron.</p>
        <a href="<?php echo e(route('coach.reflections.create', $tenant)); ?>" class="rounded-full bg-teal-600 px-4 py-2 text-sm font-medium text-white hover:bg-teal-700">New prompt</a>
    </div>

    <ul class="mt-2 divide-y divide-stone-200 rounded-2xl border border-stone-200 bg-white shadow-sm">
        <?php $__empty_1 = true; $__currentLoopData = $prompts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $prompt): $__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($prompt->title ?: 'Untitled'); ?></span>
                    <span class="ml-2 text-xs <?php echo e($prompt->is_published ? 'text-teal-700' : ($prompt->scheduled_publish_at ? 'text-amber-800' : 'text-stone-400')); ?>">
                        <?php if($prompt->is_published): ?>
                            Published
                        <?php elseif($prompt->scheduled_publish_at): ?>
                            Scheduled
                        <?php else: ?>
                            Draft
                        <?php endif; ?>
                    </span>
                    <?php if($prompt->is_published && $prompt->published_at): ?>
                        <span class="ml-2 text-xs text-stone-500"><?php echo e($prompt->published_at->timezone(config('app.timezone'))->format('M j, Y g:i A')); ?></span>
                    <?php elseif($prompt->scheduled_publish_at && ! $prompt->is_published): ?>
                        <span class="ml-2 text-xs text-stone-500"><?php echo e($prompt->scheduled_publish_at->timezone(config('app.timezone'))->format('M j, Y g:i A')); ?></span>
                    <?php endif; ?>
                </div>
                <a href="<?php echo e(route('coach.reflections.edit', [$tenant, $prompt])); ?>" class="text-sm text-teal-700 hover:underline">Edit</a>
            </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 reflection prompts 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/reflections/index.blade.php ENDPATH**/ ?>