<?php $__env->startSection('title', 'Section Details'); ?>

<?php $__env->startSection('content'); ?>
    <div class="flex justify-between items-center mb-6">
        <h1 class="text-2xl font-bold">Section Details</h1>
        <div class="space-x-2">
            <a href="<?php echo e(route('admin.sections.edit', $section->id)); ?>" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">Edit</a>
            <a href="<?php echo e(route('admin.sections.index')); ?>" class="bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600">Back</a>
        </div>
    </div>
    <div class="bg-white rounded-lg shadow p-6 max-w-lg">
        <table class="w-full">
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">ID</td><td class="py-3"><?php echo e($section->id); ?></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Key</td><td class="py-3"><code class="bg-gray-100 px-2 py-1 rounded"><?php echo e($section->key); ?></code></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Title</td><td class="py-3"><?php echo e($section->title); ?></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Subtitle</td><td class="py-3"><?php echo e($section->subtitle ?? '-'); ?></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Description</td><td class="py-3"><?php echo e($section->description ?? '-'); ?></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Badge Text</td><td class="py-3"><?php echo e($section->badge_text ?? '-'); ?></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Button Text</td><td class="py-3"><?php echo e($section->button_text ?? '-'); ?></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Button Link</td><td class="py-3"><?php echo e($section->button_link ?? '-'); ?></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Sort Order</td><td class="py-3"><?php echo e($section->sort_order); ?></td></tr>
            <tr class="border-b"><td class="py-3 font-medium text-gray-600">Active</td><td class="py-3"><?php echo e($section->is_active ? 'Yes' : 'No'); ?></td></tr>
            <tr><td class="py-3 font-medium text-gray-600">Created</td><td class="py-3"><?php echo e($section->created_at->format('Y-m-d H:i')); ?></td></tr>
        </table>
    </div>
    <?php $section->load('media'); ?>
    <?php if($section->image_url): ?>
        <div class="bg-white rounded-lg shadow p-6 mt-6 max-w-lg">
            <h3 class="font-bold text-lg mb-4">Image Preview</h3>
            <img src="<?php echo e($section->image_url); ?>" alt="<?php echo e($section->title); ?>" class="w-full rounded border">
        </div>
    <?php endif; ?>
    <?php if($section->media->isNotEmpty()): ?>
        <div class="bg-white rounded-lg shadow p-6 mt-6">
            <h3 class="font-bold text-lg mb-4">Media (<?php echo e($section->media->count()); ?>)</h3>
            <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
                <?php $__currentLoopData = $section->media; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $media): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="border rounded overflow-hidden">
                        <?php if($media->type === 'image'): ?>
                            <img src="<?php echo e(Storage::disk('public')->url($media->path)); ?>" alt="<?php echo e($media->filename); ?>" class="w-full h-32 object-cover">
                        <?php else: ?>
                            <div class="h-32 bg-gray-100 flex items-center justify-center text-gray-400 text-sm"><?php echo e($media->type); ?></div>
                        <?php endif; ?>
                        <div class="p-2 text-xs truncate"><?php echo e($media->filename); ?></div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin::layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH G:\abo bilal nuisan\bernie_store\bernie-backend\Modules/Admin\resources/views/sections/show.blade.php ENDPATH**/ ?>