<?php $__env->startSection('title', 'Permissions'); ?>
<?php $__env->startSection('page-title', 'Module Permissions'); ?>

<?php $__env->startSection('breadcrumbs'); ?>
    <li class="breadcrumb-item active" aria-current="page">Permissions</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="space-y-6">
    <div class="mb-4">
        <h2 class="text-xl font-bold text-slate-900 dark:text-white">Staff access control</h2>
        <p class="mt-1 text-sm text-slate-500">Choose which system modules each administrator can open. Super administrators always retain full access.</p>
    </div>

    <div class="grid gap-4 grid-cols-1 md:grid-cols-2">
        <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="flex items-center gap-4 rounded-2xl border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-950 p-5 shadow-soft hover:-translate-y-px transition duration-150 ease-in-out">
                <span class="grid h-11 w-11 place-items-center rounded-full bg-emerald-100 dark:bg-emerald-950/55 font-bold text-emerald-700 dark:text-emerald-400"><?php echo e(strtoupper(substr($user->name, 0, 2))); ?></span>
                
                <div class="min-w-0 flex-1">
                    <div class="font-semibold text-slate-900 dark:text-white"><?php echo e($user->name); ?></div>
                    <div class="truncate text-xs text-slate-500"><?php echo e($user->email); ?></div>
                    <div class="mt-1 text-xs font-semibold text-emerald-600 dark:text-emerald-400">
                        <?php echo e($user->role === 'super_admin' ? 'Full access' : ($user->permissions === null ? 'Full access (default)' : count($user->permissions).' modules allowed')); ?>

                    </div>
                </div>

                <a href="<?php echo e(route('admin.permissions.edit', $user)); ?>" class="btn-secondary flex items-center gap-1.5 text-xs py-2 px-3">
                    <i class="bi bi-key text-slate-500"></i> Configure
                </a>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/mac/Documents/e-com/resources/views/admin/permissions/index.blade.php ENDPATH**/ ?>