<?php $__env->startSection('content'); ?>
<div class="max-w-7xl mx-auto px-6 py-8">

    <!-- PAGE HEADER -->
    <div class="flex flex-col md:flex-row justify-between items-center mb-6">
        <div class="mb-4 md:mb-0">
            <h1 class="text-3xl font-bold text-gray-800">Manage Content</h1>
            <p class="text-gray-500 text-sm mt-1">View and manage all site content sections</p>
        </div>

        <!-- Page Filter -->
        <form action="<?php echo e(route('content.index')); ?>" method="GET" class="flex items-center space-x-2">
            <label for="page" class="font-medium text-gray-700">Filter by Page:</label>
            <select name="page" id="page" class="border border-gray-300 rounded px-3 py-1">
                <option value="">All Pages</option>
                <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($page); ?>" <?php echo e($selectedPage == $page ? 'selected' : ''); ?>>
                        <?php echo e(ucfirst($page)); ?>

                    </option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
            <button type="submit" class="bg-blue-600 text-white px-4 py-1 rounded shadow hover:bg-blue-700 transition">
                Filter
            </button>
        </form>
    </div>

    <!-- CONTENT TABLE -->
    <div class="bg-white rounded-2xl shadow-lg overflow-hidden border border-gray-100">
        <table class="min-w-full text-left text-sm">
            <thead class="bg-gray-50 text-gray-600 uppercase text-xs tracking-wider">
                <tr>
                    <th class="px-6 py-3">Page</th>
                    <th class="px-6 py-3">Title</th>
                    <th class="px-6 py-3 text-right">Actions</th>
                </tr>
            </thead>

            <tbody class="divide-y divide-gray-100">
                <?php $__empty_1 = true; $__currentLoopData = $content; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr class="hover:bg-gray-50 transition">
                    <td class="px-6 py-4 text-gray-700"><?php echo e($c->page); ?></td>
                    <td class="px-6 py-4 text-gray-700"><?php echo e($c->title); ?></td>
                    <td class="px-6 py-4 text-right flex justify-end gap-3">

                        <!-- EDIT ICON -->
                        <a href="<?php echo e(route('content.edit', $c->id)); ?>"
                           class="text-blue-600 hover:text-blue-800" title="Edit">
                            <i class="fas fa-edit fa-lg"></i>
                        </a>

                        <!-- DELETE ICON -->
                        <form action="<?php echo e(route('content.destroy', $c->id)); ?>" method="POST" onsubmit="return confirm('Are you sure you want to delete this content?');">
                            <?php echo csrf_field(); ?>
                            <?php echo method_field('DELETE'); ?>
                            <button type="submit" class="text-red-600 hover:text-red-800" title="Delete">
                                <i class="fas fa-trash fa-lg"></i>
                            </button>
                        </form>

                    </td>
                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr>
                    <td colspan="4" class="px-6 py-12 text-center text-gray-500">
                        No content found.
                    </td>
                </tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/dawoodik/Documents/x/ahoj-admin/resources/views/admin/content/index.blade.php ENDPATH**/ ?>