<?php if (isset($component)) { $__componentOriginal91fdd17964e43374ae18c674f95cdaa3 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal91fdd17964e43374ae18c674f95cdaa3 = $attributes; } ?>
<?php $component = App\View\Components\AdminLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AdminLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <h1 class="text-2xl font-bold">Tours List</h1>
     <?php $__env->endSlot(); ?>
    <?php if (isset($component)) { $__componentOriginal2342e1caa3b5224183b4572420a79d31 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal2342e1caa3b5224183b4572420a79d31 = $attributes; } ?>
<?php $component = App\View\Components\Message::resolve(['type' => 'success','message' => 'success'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('message'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\Message::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal2342e1caa3b5224183b4572420a79d31)): ?>
<?php $attributes = $__attributesOriginal2342e1caa3b5224183b4572420a79d31; ?>
<?php unset($__attributesOriginal2342e1caa3b5224183b4572420a79d31); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal2342e1caa3b5224183b4572420a79d31)): ?>
<?php $component = $__componentOriginal2342e1caa3b5224183b4572420a79d31; ?>
<?php unset($__componentOriginal2342e1caa3b5224183b4572420a79d31); ?>
<?php endif; ?>
    <?php if (isset($component)) { $__componentOriginal2342e1caa3b5224183b4572420a79d31 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal2342e1caa3b5224183b4572420a79d31 = $attributes; } ?>
<?php $component = App\View\Components\Message::resolve(['type' => 'danger','message' => 'error'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('message'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\Message::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal2342e1caa3b5224183b4572420a79d31)): ?>
<?php $attributes = $__attributesOriginal2342e1caa3b5224183b4572420a79d31; ?>
<?php unset($__attributesOriginal2342e1caa3b5224183b4572420a79d31); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal2342e1caa3b5224183b4572420a79d31)): ?>
<?php $component = $__componentOriginal2342e1caa3b5224183b4572420a79d31; ?>
<?php unset($__componentOriginal2342e1caa3b5224183b4572420a79d31); ?>
<?php endif; ?>
    <div class="mb-4 flex justify-between items-center">
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('tour-published-unpublished')): ?>
        <div>
            <a href="<?php echo e(route('admin.tour_settings.published')); ?>" class="inline-flex items-center px-4 py-2 text-xs font-semibold tracking-widest uppercase border border-transparent rounded-md shadow-sm
            <?php echo e(request()->routeIs('admin.tour_settings.unpublished') ? 'bg-gray-300 text-black hover:bg-gray-400' : 'bg-blue-600 text-white hover:bg-blue-700'); ?>">
            View Published Tours
            </a>
            <a href="<?php echo e(route('admin.tour_settings.unpublished')); ?>" class="inline-flex items-center px-4 py-2 text-xs font-semibold tracking-widest uppercase border border-transparent rounded-md shadow-sm
                <?php echo e(request()->routeIs('admin.tour_settings.unpublished') ? 'bg-gray-600 text-white hover:bg-gray-700' : 'bg-gray-300 text-black hover:bg-gray-400'); ?>">
                View Unpublished Tours
            </a>
        </div>
        <?php endif; ?>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('tour-delete')): ?>
        <div>
            <a href="<?php echo e(route('admin.tour_settings.trashed')); ?>" class="inline-flex items-center px-4 py-2 text-xs font-semibold tracking-widest text-white uppercase bg-red-600 rounded-md shadow-sm hover:bg-red-700">
                View Trashed Tours
            </a>
        </div>
        <?php endif; ?>
    </div>

    <div class="p-6 bg-white rounded-lg shadow-md dark:bg-gray-800">
        <!-- Desktop View -->
        <div class="hidden md:block">
            <div class="flex items-center justify-between mb-4">
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('tour-import')): ?>
                <?php echo $__env->make('admin.tour_setting.bokun-model', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                <?php endif; ?>
            </div>

            <!-- Scrollable Table Container -->
            <div class="overflow-x-auto">
                <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
                    <thead class="bg-gray-50 dark:bg-gray-800">
                        <tr>
                            
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Bokun ID</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Bokun Title</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Tour Name</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Response Template</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Time</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Guide Fee</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Duration</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">City</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Tour Type</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400">Manager</th>
                            <th class="px-4 py-3 text-xs font-medium text-left text-gray-500 uppercase dark:text-gray-400 text-center">Action</th>
                        </tr>
                    </thead>
                    <tbody id="userTable" class="bg-white divide-y divide-gray-200 dark:bg-gray-900 dark:divide-gray-700">
                        <?php $__empty_1 = true; $__currentLoopData = $tours; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tour): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr>
                            
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->bokun_id); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->bokun_title); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->name); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->groups->pluck('name')->implode(', ')); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->time); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->guide_free); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->duration); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->city->eng_name ?? 'N/A'); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->tourTypes->pluck('name')->implode(', ')); ?></td>
                            <td class="px-4 py-3 text-sm font-medium text-gray-900 dark:text-gray-100"><?php echo e($tour->managers->pluck('name')->join(', ')); ?></td>
                            <td class="px-4 py-3 text-sm font-medium whitespace-nowrap">
                                <a href="<?php echo e(route('admin.tour_settings.show', $tour)); ?>" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300">View</a>
                                <?php if($tour->status): ?>
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('tour-edit')): ?>
                                <a href="<?php echo e(route('admin.tour_settings.edit', $tour)); ?>" class="ml-4 text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300">Edit</a>
                                <?php endif; ?>
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('tour-delete')): ?>
                                <button type="button" class="inline ml-4 text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300" data-bs-toggle="modal" data-bs-target="#deleteModal<?php echo e($tour->id); ?>">
                                    Delete
                                </button>
                                <?php if (isset($component)) { $__componentOriginal37b7f052626c638ba0443fdb400d6f57 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal37b7f052626c638ba0443fdb400d6f57 = $attributes; } ?>
<?php $component = App\View\Components\DeleteModal::resolve(['type' => 'tour','id' => $tour->id,'name' => $tour->name,'route' => 'admin.tour_settings.destroy'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('delete-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\DeleteModal::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal37b7f052626c638ba0443fdb400d6f57)): ?>
<?php $attributes = $__attributesOriginal37b7f052626c638ba0443fdb400d6f57; ?>
<?php unset($__attributesOriginal37b7f052626c638ba0443fdb400d6f57); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal37b7f052626c638ba0443fdb400d6f57)): ?>
<?php $component = $__componentOriginal37b7f052626c638ba0443fdb400d6f57; ?>
<?php unset($__componentOriginal37b7f052626c638ba0443fdb400d6f57); ?>
<?php endif; ?>
                                <?php endif; ?>
                                <?php endif; ?>
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('tour-published-unpublished')): ?>
                                <button type="button" class="ml-4 px-3 py-1 text-white text-xs font-semibold rounded-md <?php echo e($tour->status ? 'bg-green-500 hover:bg-green-600' : 'bg-gray-500 hover:bg-gray-600'); ?>" data-bs-toggle="modal" data-bs-target="#statusModal<?php echo e($tour->id); ?>">
                                    <?php echo e($tour->status ? 'Published' : 'Unpublished'); ?>

                                </button>
                                <?php if (isset($component)) { $__componentOriginalc7fde9c4e105387dbff2286758ae4b66 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalc7fde9c4e105387dbff2286758ae4b66 = $attributes; } ?>
<?php $component = App\View\Components\StatusModal::resolve(['type' => $tour->status ? 'Unpublished' : 'Published','id' => $tour->id,'name' => $tour->name,'route' => 'admin.tour_settings.toggle-status'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('status-modal'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\StatusModal::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalc7fde9c4e105387dbff2286758ae4b66)): ?>
<?php $attributes = $__attributesOriginalc7fde9c4e105387dbff2286758ae4b66; ?>
<?php unset($__attributesOriginalc7fde9c4e105387dbff2286758ae4b66); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc7fde9c4e105387dbff2286758ae4b66)): ?>
<?php $component = $__componentOriginalc7fde9c4e105387dbff2286758ae4b66; ?>
<?php unset($__componentOriginalc7fde9c4e105387dbff2286758ae4b66); ?>
<?php endif; ?>
                                <?php endif; ?>
                            </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="12" class="px-6 py-4 text-center text-gray-500 dark:text-gray-400">
                                No Tours found.
                            </td>
                        </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>

            <!-- Pagination -->
            <div class="mt-4">
                <?php echo e($tours->links()); ?>

            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal91fdd17964e43374ae18c674f95cdaa3)): ?>
<?php $attributes = $__attributesOriginal91fdd17964e43374ae18c674f95cdaa3; ?>
<?php unset($__attributesOriginal91fdd17964e43374ae18c674f95cdaa3); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal91fdd17964e43374ae18c674f95cdaa3)): ?>
<?php $component = $__componentOriginal91fdd17964e43374ae18c674f95cdaa3; ?>
<?php unset($__componentOriginal91fdd17964e43374ae18c674f95cdaa3); ?>
<?php endif; ?>
<?php /**PATH C:\xampp8.2\htdocs\Portal\resources\views/admin/tour_setting/index.blade.php ENDPATH**/ ?>