<?php $__env->startSection('title', 'Hero баннер'); ?>
<?php $__env->startSection('page_title', 'Hero баннерууд'); ?>

<?php $__env->startSection('content'); ?>

<div class="flex justify-end mb-6">
    <a href="<?php echo e(route('admin.heroes.create')); ?>" class="bg-nsma-red text-white font-semibold px-4 py-2 rounded-lg">+ Шинэ Hero</a>
</div>

<div class="grid md:grid-cols-2 gap-6">
    <?php $__empty_1 = true; $__currentLoopData = $heroes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $h): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <div class="bg-nsma-dark text-white rounded-2xl p-6">
            <div class="flex items-center justify-between mb-4">
                <span class="text-xs px-2 py-1 rounded <?php echo e($h->is_active ? 'bg-green-500' : 'bg-gray-600'); ?>"><?php echo e($h->is_active ? 'Идэвхтэй' : 'Идэвхгүй'); ?></span>
                <span class="text-xs text-gray-400">Эрэмбэ: <?php echo e($h->sort_order); ?></span>
            </div>
            <h3 class="text-2xl font-black mb-1"><?php echo e($h->title_line_1); ?></h3>
            <h3 class="text-2xl font-black text-nsma-red mb-1"><?php echo e($h->title_line_2); ?></h3>
            <h3 class="text-2xl font-black mb-3"><?php echo e($h->title_line_3); ?></h3>
            <p class="text-sm text-gray-300 mb-4 line-clamp-2"><?php echo e($h->description); ?></p>
            <?php if($h->sideImageUrls()): ?>
                <div class="grid grid-cols-3 gap-1 mb-4">
                    <?php $__currentLoopData = array_slice($h->sideImageUrls(), 0, 3); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <img src="<?php echo e($img); ?>" class="w-full aspect-square object-cover rounded">
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            <?php endif; ?>
            <div class="flex gap-2">
                <a href="<?php echo e(route('admin.heroes.edit', $h)); ?>" class="px-3 py-1 text-xs bg-white text-nsma-dark rounded font-semibold">Засах</a>
                <form action="<?php echo e(route('admin.heroes.destroy', $h)); ?>" method="POST" class="inline" onsubmit="return confirm('Устгах уу?')">
                    <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                    <button class="px-3 py-1 text-xs bg-red-500 text-white rounded">Устгах</button>
                </form>
            </div>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <p class="col-span-2 text-center text-gray-500 py-12">Hero баннер нэмээгүй байна.</p>
    <?php endif; ?>
</div>

<?php $__env->stopSection(); ?>

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