<?php if (isset($component)) { $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AdminPanelLayout::class, []); ?>
<?php $component->withName('admin-panel-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title'); ?>
        ویرایش نقش کاربر
     <?php $__env->endSlot(); ?>
     <?php $__env->slot('main'); ?>
        <!-- Checked checkbox -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1 class="m-0 text-dark">ویرایش نقش کاربر <?php echo e($user->name ?? $user->number); ?></h1>
                    </div><!-- /.col -->
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-left">

                            <li class="breadcrumb-item">مدیریت کاربران</li>
                            <li class="breadcrumb-item active">ویرایش نقش کاربر</li>
                        </ol>
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.container-fluid -->
        </div>
        <section class="content mt-sm-3">
            <div class="card p-0 card-primary col-md-8 mx-auto">
                <div class="card-header">
                    <h3 class="card-title">ویرایش نقش کاربر</h3>
                </div>
            <!-- /.card-header -->
                <!-- form start -->
                <form class="mt-3 p-2" action="<?php echo e(route('users.update_roles',$user->id)); ?>" method="post"c>
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('patch'); ?>
                    <?php $__errorArgs = ['roles.*'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <div class="invalid">
                        <p class="text-danger"><?php echo e($message); ?></p>
                    </div>
                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                    <div class="d-flex flex-wrap col-12">
                        <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="form-check col-sm-6 mb-sm-2">
                                <input
                                    class="form-check-input"
                                    type="radio"
                                    name="role"
                                    value="<?php echo e($role->name); ?>"
                                    id="flexCheckChecked"
                                    <?php if($user->hasRole($role->name)): ?>
                                    checked
                                    <?php endif; ?>
                                />
                                <label class="form-check-label" for="flexCheckChecked">
                                    <?php echo app('translator')->get($role->name); ?>
                                </label>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                    <button type="submit" class="btn btn-primary btn-block mt-3">ویرایش</button>
                </form>
            </div>
        </section>
     <?php $__env->endSlot(); ?>
    <?php if(session()->get('status') == 'updated'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'success',
                    text: 'ویرایش نقش کاربر با موفقیت انجام شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
    <?php if(session()->get('status') == 'error'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'error',
                    text: 'ویرایش نقش کاربر با خطا مواجه شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
 <?php if (isset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5)): ?>
<?php $component = $__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5; ?>
<?php unset($__componentOriginalfcbcb094a4e25784fc05a845b0fe2686439b0eb5); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\newer\Modules\Mehrab\User\Providers/../Resources/Views//Admin/edit_user_role.blade.php ENDPATH**/ ?>
