<?php $__env->startSection('title', 'Branch Management'); ?>
<?php $__env->startSection('page_title', 'Branch Management'); ?>

<?php $__env->startSection('content'); ?>
<div class="mb-4 flex justify-between items-center">
    <h3 class="text-[11px] font-bold uppercase tracking-widest text-zinc-600 dark:text-zinc-300">Restaurant Branches</h3>
    <a href="<?php echo e(route('branches.create')); ?>" class="px-3 py-1 bg-amber-600 hover:bg-amber-500 text-white text-[10px] font-bold uppercase tracking-widest rounded-sm transition-all active:scale-[0.97]">
        Add New Branch
    </a>
</div>

<div class="bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-sm shadow-sm overflow-hidden">
    <div class="overflow-x-auto">
        <table class="w-full text-left text-[11px]">
            <thead class="bg-zinc-100 dark:bg-zinc-800/80 text-zinc-500 dark:text-zinc-400 uppercase tracking-tighter font-bold border-b border-zinc-200 dark:border-zinc-800">
                <tr>
                    <th class="px-4 py-2">Branch Name</th>
                    <th class="px-4 py-2">Client (Brand)</th>
                    <th class="px-4 py-2">Slug</th>
                    <th class="px-4 py-2">Location</th>
                    <th class="px-4 py-2 text-center">Status</th>
                    <th class="px-4 py-2 text-right">Actions</th>
                </tr>
            </thead>
            <tbody class="divide-y divide-zinc-100 dark:divide-zinc-800 text-zinc-600 dark:text-zinc-400">
                <?php $__empty_1 = true; $__currentLoopData = $branches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $branch): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="hover:bg-zinc-50 dark:hover:bg-zinc-800/50 transition-colors">
                        <td class="px-4 py-2 font-bold text-zinc-900 dark:text-zinc-100"><?php echo e($branch->name); ?></td>
                        <td class="px-4 py-2">
                            <span class="px-2 py-0.5 rounded-sm bg-zinc-100 dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 text-[10px]">
                                <?php echo e($branch->client->name); ?>

                            </span>
                        </td>
                        <td class="px-4 py-2 text-zinc-500 font-mono text-[10px]"><?php echo e($branch->slug); ?></td>
                        <td class="px-4 py-2 truncate max-w-[150px]"><?php echo e($branch->address ?? 'N/A'); ?></td>
                        <td class="px-4 py-2 text-center">
                            <?php if($branch->active): ?>
                                <span class="text-[9px] font-bold text-green-500 uppercase">Online</span>
                            <?php else: ?>
                                <span class="text-[9px] font-bold text-red-500 uppercase">Offline</span>
                            <?php endif; ?>
                        </td>
                        <td class="px-4 py-2 text-right">
                            <div class="flex justify-end space-x-2">
                                <a href="<?php echo e(route('branches.edit', $branch)); ?>" class="text-amber-600 hover:text-amber-500 font-bold uppercase text-[9px]">Edit</a>
                                <form action="<?php echo e(route('branches.destroy', $branch)); ?>" method="POST" onsubmit="return confirm('Delete this branch?')">
                                    <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                    <button type="submit" class="text-red-600 hover:text-red-500 font-bold uppercase text-[9px]">Delete</button>
                                </form>
                            </div>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="6" class="px-4 py-12 text-center italic opacity-50">No branches found.</td>
                    </tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>

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

</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.super-admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/sbs/Downloads/Archive 13/resources/views/super-admin/branches/index.blade.php ENDPATH**/ ?>