<?php $__env->startSection('title', 'Hero Slides'); ?>

<?php $__env->startSection('content'); ?>
    <div class="d-flex justify-content-between align-items-center mb-4">
        <h5 class="page-title mb-0">Hero Slides</h5>
        <a href="<?php echo e(route('admin.hero-slides.create')); ?>" class="btn btn-primary"><i class="bi bi-plus-lg me-1"></i> Add Slide</a>
    </div>

    <div class="alert alert-light border small">
        <i class="bi bi-info-circle me-1"></i> When more than one slide is active, they play as an automatic background slider on the home page hero. The first slide (lowest sort order) shows by default.
    </div>

    <div class="card">
        <div class="card-body p-0">
            <table class="table table-hover align-middle mb-0">
                <thead>
                    <tr><th>#</th><th>Image</th><th>Title / Eyebrow</th><th>Status</th><th class="text-end">Actions</th></tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $slides; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $slide): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            <td><?php echo e($loop->iteration); ?></td>
                            <td><img src="<?php echo e(\App\Services\FileUploadService::url($slide->image)); ?>" class="list-image" style="width:90px;height:50px;object-fit:cover"></td>
                            <td>
                                <span class="fw-semibold d-block"><?php echo e($slide->title); ?></span>
                                <?php if($slide->eyebrow): ?><small class="text-muted"><?php echo e($slide->eyebrow); ?></small><?php endif; ?>
                            </td>
                            <td><?php if($slide->is_active): ?><span class="badge bg-success">Active</span><?php else: ?><span class="badge bg-secondary">Inactive</span><?php endif; ?></td>
                            <td class="text-end">
                                <a href="<?php echo e(route('admin.hero-slides.edit', $slide)); ?>" class="btn btn-sm btn-outline-primary">Edit</a>
                                <form action="<?php echo e(route('admin.hero-slides.destroy', $slide)); ?>" method="POST" class="d-inline" data-confirm="Delete this slide?">
                                    <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="btn btn-sm btn-outline-danger">Delete</button>
                                </form>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr><td colspan="5" class="text-center text-muted py-4">No hero slides yet.</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
    <div class="mt-3"><?php echo e($slides->links()); ?></div>
<?php $__env->stopSection(); ?>

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