<?php $__env->startSection('title', 'Roles & Permissions'); ?>
<?php $__env->startSection('page_title', 'Roles & Permissions'); ?>
<?php $__env->startSection('breadcrumbs'); ?>
    <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Home</a></li>
    <li class="breadcrumb-item active">Roles</li>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page_actions'); ?>
    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('roles.create')): ?>
        <a href="<?php echo e(route('roles.create')); ?>" class="btn btn-primary"><i class="bi bi-plus-lg me-1"></i>Add Role</a>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="row g-3">
        <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-md-6 col-xl-4">
                <div class="card h-100">
                    <div class="card-body">
                        <div class="d-flex justify-content-between align-items-start">
                            <div>
                                <h6 class="mb-1"><i class="bi bi-shield-lock text-primary me-1"></i><?php echo e($role->name); ?></h6>
                                <div class="small text-muted"><?php echo e($role->users_count); ?> user(s)</div>
                            </div>
                            <span class="badge bg-soft-info"><?php echo e($role->permissions_count); ?> perms</span>
                        </div>
                        <div class="mt-3 d-flex gap-2">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('roles.update')): ?>
                                <a href="<?php echo e(route('roles.edit', $role)); ?>" class="btn btn-sm btn-light border"><i class="bi bi-pencil me-1"></i>Edit</a>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('roles.delete')): ?>
                                <?php if($role->name !== \App\Models\User::SUPER_ADMIN): ?>
                                    <form method="POST" action="<?php echo e(route('roles.destroy', $role)); ?>" data-confirm="Delete role “<?php echo e($role->name); ?>”?">
                                        <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                                        <button class="btn btn-sm btn-light border text-danger"><i class="bi bi-trash"></i></button>
                                    </form>
                                <?php endif; ?>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/u385418287/domains/itartificer.com/public_html/sms-erp/resources/views/roles/index.blade.php ENDPATH**/ ?>