<div class="ml-[280px] min-h-screen space-y-10">

    <div class="flex justify-between items-center">
        <h2 class="text-2xl font-semibold">Service Categories</h2>

        <a href="<?php echo e(route('admin.service.categories')); ?>" class="px-5 py-2 bg-[#f38121] text-white rounded-lg">
            Manage Categories
        </a>
    </div>

    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session()->has('success')): ?>
        <div
            class="flex items-center justify-between
               bg-green-50 border border-green-200
               text-green-800 px-5 py-3 rounded-lg">
            <span><?php echo e(session('success')); ?></span>

            <button onclick="this.parentElement.remove()" class="text-green-600 font-bold">
                ×
            </button>
        </div>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>


    <div class="bg-white rounded-xl border overflow-hidden">
        <table class="w-full text-sm">
            <thead class="bg-gray-50 text-gray-500">
                <tr>
                    <th class="px-6 py-3 text-left">Category Name</th>
                     <th class="px-6 py-3 text-left">Description</th>
                    <th class="px-6 py-3 text-left">Slug</th>
                    <th class="px-6 py-3 text-center">Status</th>
                    <th class="px-6 py-3 text-right">Action</th>
                    <th class="px-6 py-3 text-center">Page View</th>
                </tr>
            </thead>

            <tbody>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="border-t">
                        <td class="px-6 py-3 font-medium">
                            <?php echo e($category->name); ?>

                        </td>

                        <td class="px-6 py-3 text-gray-500">
                             <?php echo e(Str::limit($category->description, 120)); ?>

                        </td>

                        <td class="px-6 py-3 text-gray-500">
                            <?php echo e($category->slug); ?>

                        </td>

                        <td class="px-6 py-3 text-center">
                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($category->status): ?>
                                <span class="text-green-600">Active</span>
                            <?php else: ?>
                                <span class="text-red-500">Inactive</span>
                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                        </td>

                        <td class="px-6 py-3 text-right space-x-4">
                             <a href="<?php echo e(route('admin.services.categories.edit', $category->id)); ?>"
                                class="text-blue-600 hover:underline">
                                Edit
                            </a>


                            <button class="text-red-500 hover:underline">
                                Delete
                            </button>
                        </td>
                        
                        
                        <td>
                            <a href="<?php echo e(route('services.category.view', $category->slug)); ?>" target="_blank"
                                class="text-blue-600 hover:underline">
                                View
                            </a>
                        </td>
                       

                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="4" class="px-6 py-6 text-center text-gray-400">
                            No categories found
                        </td>
                    </tr>
                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
            </tbody>
        </table>
    </div>

</div>
<?php /**PATH /home1/eggfirst/public_html/resources/views/livewire/admin/services/list.blade.php ENDPATH**/ ?>