<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\AppLayout::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex items-center justify-between">
            <h2 class="font-semibold text-xl text-gray-800 leading-tight">Labs</h2>
            <a href="<?php echo e(route('admin.labs.create')); ?>" class="px-4 py-2 bg-indigo-600 text-white rounded">Add Lab</a>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-8">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">

            <?php if(session('success')): ?>
                <div class="mb-4 p-3 bg-green-100 text-green-800 rounded"><?php echo e(session('success')); ?></div>
            <?php endif; ?>

            <div class="bg-white shadow rounded p-4 overflow-x-auto">
                <table class="min-w-full text-sm">
                    <thead>
                        <tr class="text-left border-b">
                            <th class="py-2">Lab ID</th>
                            <th class="py-2">Name</th>
                            <th class="py-2">Branch</th>
                            <th class="py-2">Phone</th>
                            <th class="py-2">Status</th>
                            <th class="py-2 text-right">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $labs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lab): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr class="border-b">
                                <td class="py-2 font-semibold"><?php echo e($lab->id); ?></td>
                                <td class="py-2"><?php echo e($lab->name); ?></td>
                                <td class="py-2"><?php echo e($lab->branch_name ?: '-'); ?></td>
                                <td class="py-2"><?php echo e($lab->phone); ?></td>
                                <td class="py-2">
                                    <?php if($lab->is_active): ?>
                                        <span class="px-2 py-1 rounded bg-green-100 text-green-700">Active</span>
                                    <?php else: ?>
                                        <span class="px-2 py-1 rounded bg-gray-100 text-gray-700">Inactive</span>
                                    <?php endif; ?>
                                </td>
                                <td class="py-2 text-right space-x-2">
                                    <a class="text-indigo-600" href="<?php echo e(route('admin.labs.show', $lab)); ?>">View</a>
                                    <a class="text-blue-600" href="<?php echo e(route('admin.labs.edit', $lab)); ?>">Edit</a>
                                    <a class="text-purple-600" href="<?php echo e(route('admin.labs.pricing.edit', $lab)); ?>">Pricing</a>
                                    <form class="inline" method="POST" action="<?php echo e(route('admin.labs.destroy', $lab)); ?>" onsubmit="return confirm('Delete this lab?')">
                                        <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                        <button class="text-red-600" type="submit">Delete</button>
                                    </form>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <?php if($labs->count() === 0): ?>
                            <tr><td colspan="6" class="py-6 text-center text-gray-500">No labs yet.</td></tr>
                        <?php endif; ?>
                    </tbody>
                </table>

                <div class="mt-4"><?php echo e($labs->links()); ?></div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\wamp64\www\lab-result-portal\resources\views\admin\labs\index.blade.php ENDPATH**/ ?>