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

<?php $__env->startSection('content'); ?>
    <!-- Top Bar: Search and Actions -->
    <div class="mb-6 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4">
        <!-- Search Bar -->
        <div class="flex-1 max-w-md">
            <?php if (isset($component)) { $__componentOriginal5cb383ddee3a6dc44b6e82e90e14b261 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5cb383ddee3a6dc44b6e82e90e14b261 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.search-input','data' => ['id' => 'slidesSearch','placeholder' => 'Search here']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.search-input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => 'slidesSearch','placeholder' => 'Search here']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5cb383ddee3a6dc44b6e82e90e14b261)): ?>
<?php $attributes = $__attributesOriginal5cb383ddee3a6dc44b6e82e90e14b261; ?>
<?php unset($__attributesOriginal5cb383ddee3a6dc44b6e82e90e14b261); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5cb383ddee3a6dc44b6e82e90e14b261)): ?>
<?php $component = $__componentOriginal5cb383ddee3a6dc44b6e82e90e14b261; ?>
<?php unset($__componentOriginal5cb383ddee3a6dc44b6e82e90e14b261); ?>
<?php endif; ?>
        </div>

        <!-- Action Buttons -->
        <div class="flex items-center gap-3">
            <a href="<?php echo e(route('admin.slides.create')); ?>"
                class="btn-primary">
                <i class="fas fa-plus mr-2"></i>New Slide
            </a>
        </div>
    </div>

    <!-- DataTable -->
    <?php if (isset($component)) { $__componentOriginal8aaf9779783cdf64609094123653a0b9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8aaf9779783cdf64609094123653a0b9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.datatable','data' => ['id' => 'slidesTable','ajaxUrl' => route('admin.slides.index'),'columns' => [
            ['data' => 'image', 'orderable' => false, 'searchable' => false],
            ['data' => 'title', 'orderable' => true, 'searchable' => true],
            ['data' => 'order', 'orderable' => true, 'searchable' => false],
            ['data' => 'status', 'orderable' => false, 'searchable' => false],
            ['data' => 'actions', 'orderable' => false, 'searchable' => false]
        ],'order' => [[2, 'asc']],'columnDefs' => [
            ['orderable' => false, 'targets' => [0, 3, 4]],
            ['className' => 'text-left', 'targets' => [0, 1, 2, 3]],
            ['className' => 'text-right', 'targets' => [4]]
        ],'searchId' => 'slidesSearch','padding' => false]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('datatable'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => 'slidesTable','ajax-url' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('admin.slides.index')),'columns' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute([
            ['data' => 'image', 'orderable' => false, 'searchable' => false],
            ['data' => 'title', 'orderable' => true, 'searchable' => true],
            ['data' => 'order', 'orderable' => true, 'searchable' => false],
            ['data' => 'status', 'orderable' => false, 'searchable' => false],
            ['data' => 'actions', 'orderable' => false, 'searchable' => false]
        ]),'order' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute([[2, 'asc']]),'column-defs' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute([
            ['orderable' => false, 'targets' => [0, 3, 4]],
            ['className' => 'text-left', 'targets' => [0, 1, 2, 3]],
            ['className' => 'text-right', 'targets' => [4]]
        ]),'search-id' => 'slidesSearch','padding' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(false)]); ?>
         <?php $__env->slot('thead', null, []); ?> 
            <th class="no-export">Image</th>
            <th>Title</th>
            <th>Order</th>
            <th>Status</th>
            <th class="no-export text-right">Actions</th>
         <?php $__env->endSlot(); ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8aaf9779783cdf64609094123653a0b9)): ?>
<?php $attributes = $__attributesOriginal8aaf9779783cdf64609094123653a0b9; ?>
<?php unset($__attributesOriginal8aaf9779783cdf64609094123653a0b9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8aaf9779783cdf64609094123653a0b9)): ?>
<?php $component = $__componentOriginal8aaf9779783cdf64609094123653a0b9; ?>
<?php unset($__componentOriginal8aaf9779783cdf64609094123653a0b9); ?>
<?php endif; ?>

    <script>
        // Toggle dropdown
        function toggleDropdown(id) {
            const dropdown = document.getElementById('dropdown-' + id);
            const isHidden = dropdown.classList.contains('hidden');

            // Close all other dropdowns
            document.querySelectorAll('[id^="dropdown-"]').forEach(el => {
                if (el.id !== 'dropdown-' + id) {
                    el.classList.add('hidden');
                }
            });

            // Toggle current dropdown
            if (isHidden) {
                dropdown.classList.remove('hidden');
            } else {
                dropdown.classList.add('hidden');
            }
        }

        // Close dropdowns when clicking outside
        document.addEventListener('click', function (event) {
            if (!event.target.closest('[onclick*="toggleDropdown"]') && !event.target.closest('[id^="dropdown-"]')) {
                document.querySelectorAll('[id^="dropdown-"]').forEach(el => {
                    el.classList.add('hidden');
                });
            }
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/mac/Documents/e-com/resources/views/admin/slides/index.blade.php ENDPATH**/ ?>