<?php $__env->startSection('title', 'SaaS Tenants Directory'); ?>

<?php $__env->startSection('content'); ?>
<div class="space-y-6">
    <div>
        <h1 class="text-xl font-bold text-slate-900 dark:text-white">Typing Center Tenants Directory</h1>
        <p class="text-xs text-slate-500 dark:text-slate-400">All registered tenant organizations on the SaaS platform.</p>
    </div>

    <div class="bg-white dark:bg-slate-800 rounded-3xl border border-slate-200 dark:border-slate-700/60 shadow-sm overflow-hidden">
        <div class="overflow-x-auto">
            <table class="w-full text-left rtl:text-right text-xs">
                <thead class="bg-slate-50 dark:bg-slate-900/60 border-b border-slate-200 dark:border-slate-700 text-slate-500 uppercase tracking-wider font-bold">
                    <tr>
                        <th class="px-6 py-4">Company Name</th>
                        <th class="px-6 py-4">Emirate</th>
                        <th class="px-6 py-4">TRN</th>
                        <th class="px-6 py-4">Branches</th>
                        <th class="px-6 py-4">Subscription Plan</th>
                        <th class="px-6 py-4">Status</th>
                    </tr>
                </thead>
                <tbody class="divide-y divide-slate-200 dark:divide-slate-700/60 font-medium">
                    <?php $__currentLoopData = $tenants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tenant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr class="hover:bg-slate-50 dark:hover:bg-slate-700/30">
                            <td class="px-6 py-4">
                                <div class="font-bold text-slate-900 dark:text-white"><?php echo e($tenant->company_name); ?></div>
                                <div class="text-[11px] text-slate-400 font-normal"><?php echo e($tenant->email); ?></div>
                            </td>
                            <td class="px-6 py-4 font-semibold text-slate-700 dark:text-slate-300"><?php echo e($tenant->emirate); ?></td>
                            <td class="px-6 py-4 font-mono font-bold text-slate-700 dark:text-slate-300"><?php echo e($tenant->trn ?? 'N/A'); ?></td>
                            <td class="px-6 py-4 font-bold text-sky-600"><?php echo e(count($tenant->branches)); ?> Branches</td>
                            <td class="px-6 py-4">
                                <span class="px-2.5 py-0.5 rounded-full bg-purple-100 dark:bg-purple-950 text-purple-700 dark:text-purple-300 text-[10px] font-bold">
                                    <?php echo e($tenant->subscription->plan->name ?? 'Professional Plan'); ?>

                                </span>
                            </td>
                            <td class="px-6 py-4">
                                <span class="px-2.5 py-0.5 rounded-full bg-emerald-100 dark:bg-emerald-950 text-emerald-700 dark:text-emerald-300 text-[10px] font-bold">Active</span>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>
        <div class="p-4 border-t border-slate-200 dark:border-slate-700">
            <?php echo e($tenants->links()); ?>

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

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\typingcenter\resources\views\platform\tenants.blade.php ENDPATH**/ ?>