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


    <?php if (isset($component)) { $__componentOriginal342b33bfa6f7d125441314a0164864e25786c1fa = $component; } ?>
<?php $component = App\View\Components\Dashboard\LinksBar::resolve(['links' => [
        [
            '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">
        <div class="row justify-content-center">

            <div class="col-xl-4">
                <div class="box">
                    <form action="<?php echo e($actionUrl); ?>" method="POST" autocomplete="off">
                        <?php if (isset($component)) { $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a = $component; } ?>
<?php $component = App\View\Components\FormGroup::resolve(['properties' => [
                            'input' => [
                                'name' => 'name',
                                'value' => $nameVal,
                                'options' => [
                                    'placeholder' => 'مسوق الكتروني',
                                    'required',
                                ],
                            ],
                            'label' => [
                                'text' => 'اسم الدور',
                                'options' => [
                                    'class' => 'required',
                                ],
                            ],
                        ]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('form-group'); ?>
<?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\FormGroup::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($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a)): ?>
<?php $component = $__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a; ?>
<?php unset($__componentOriginal1c669f5858ba8e548f3c58b275327fb2f8e6401a); ?>
<?php endif; ?>

                        <input type="hidden" value="<?php echo e(request('id')); ?>" name="id">
                        <?php echo csrf_field(); ?>
                        <button type="submit" class="btn btn-main px-4"><?php echo e($btnText); ?></button>
                    </form>
                </div><!-- Box Style -->
            </div><!-- Form Add New Role -->



            <div class="col-xl-8">
                <div class="box table-responsive">
                    <table class="table table-striped table-inverse table-bordered text-center">
                        <thead class="thead-inverse">
                            <tr>
                                <th>اسم الدور</th>
                                <th>تعديل الدور</th>
                                <th>صلاحيات الدور</th>
                                <th>حذف الدور</th>
                            </tr>
                        </thead>
                        <tbody>

                            <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($row->name != 'owner'): ?>
                                    <tr>
                                        <td><?php echo e(Str::ucfirst($row->name)); ?></td>
                                        <td><a href="<?php echo e(adminUrl('roles?id=' . $row->id)); ?>"
                                                class="btn btn-main btn-sm">تعديل المسمي</a></td>
                                        <td><a href="<?php echo e(adminUrl("permissions/$row->id")); ?>"
                                                class="btn btn-success btn-sm">اضافة صلاحيات</a></td>
                                        <td>
                                            <form class="delete" action="<?php echo e(route('role-destroy')); ?>" method="POST">
                                                <?php echo method_field('DELETE'); ?>
                                                <?php echo csrf_field(); ?>
                                                <input type="hidden" name="id"
                                                    value="<?php echo e(Crypt::encryptString($row->id)); ?>">
                                                <button type="submit"
                                                    class="btn btn-outline-danger btn-sm">حذف نهائي</button>
                                            </form>
                                        </td>
                                    </tr>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                        </tbody>
                    </table>
                </div>
            </div>


        </div><!-- Row -->
    </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/role.blade.php ENDPATH**/ ?>