<?php $__env->startSection('title', 'الأدوار'); ?>
<?php $__env->startSection('content'); ?>


    <?php if (isset($component)) { $__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa = $component; } ?>
<?php $component = App\View\Components\Dashboard\LinksBar::resolve(['links' => [
        [
            'name' => 'الأدوار',
            'link' => adminUrl('roles'),
        ],
        [
            'name' => Str::ucfirst($row->name),
        ],
    ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('dashboard.links-bar'); ?>
<?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\Dashboard\LinksBar::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa)): ?>
<?php $component = $__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa; ?>
<?php unset($__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa); ?>
<?php endif; ?> <!-- links bar --->


    <section id="roles" class="mb-5">

        <form action="<?php echo e(route('update-permissions')); ?>" method="POST" autocomplete="off">

            <div class="accordion" id="permissionsAccordion">
                <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $section): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="card">
                        <div class="card-header p-0" id="heading-<?php echo e($index); ?>">
                            <h5 class="mb-0">
                                <div class="btn text-right btn-block text-primary font-16 font-weight-500 collapsed"
                                    data-toggle="collapse" data-target="#collapse-<?php echo e($index); ?>" aria-expanded="false"
                                    aria-controls="collapse-<?php echo e($index); ?>">
                                    <?php echo e($section['name']); ?>

                                </div>
                            </h5>
                        </div>

                        <div id="collapse-<?php echo e($index); ?>" class="collapse "
                            aria-labelledby="heading-<?php echo e($index); ?>" data-parent="#permissionsAccordion">
                            <div class="card-body">
                                <div class="row">
                                    <?php $__currentLoopData = $section['permissions']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <div class="col-lg-4 col-md-6 col-12 py-1">
                                            <input type="checkbox" <?php if(in_array($permission->id, $rolePermissions)): echo 'checked'; endif; ?> name="permission[]"
                                                id="perm-<?php echo e($permission->id); ?>" value="<?php echo e($permission->id); ?>">
                                            <label class="cursor-pointer" for="perm-<?php echo e($permission->id); ?>">
                                                <?php echo e($permission->display_name); ?>

                                            </label>
                                        </div>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>

            <input type="hidden" value="<?php echo e(Request::segment(3)); ?>" name="id">
            <?php echo csrf_field(); ?>
            <button type="submit" class="btn btn-main px-4 mt-3">حفظ التغيرات</button>
        </form>







    </section><!-- Section -->

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

<?php echo $__env->make('dashboard.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\internal-real-estate\resources\views/dashboard/role-and-permission/permission.blade.php ENDPATH**/ ?>