<?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">
                        <h4 class="m-0 text-dark">ویرایش مناطق فعال متخصص : <?php echo e($user->name ?? $user->mobile); ?></h4>
                    </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="row col-11">
                <div class="col-4">
                    <div class="list-group" id="list-tab" role="tablist">
                        <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <a class="list-group-item list-group-item-action" id="list-<?php echo e($city->id); ?>-list"
                               data-toggle="list" href="#list-<?php echo e($city->id); ?>" role="tab"
                               aria-controls="<?php echo e($city->id); ?>"><?php echo e($city->name); ?></a>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
                <div class="col-8">
                    <form action="<?php echo e(route('experts.regions_sync',$user->id)); ?>" method="post">
                        <div class="tab-content" id="nav-tabContent">
                            <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="tab-pane fade show" id="list-<?php echo e($city->id); ?>" role="tabpanel"
                                     aria-labelledby="list-<?php echo e($city->id); ?>-list">
                                    <div class="mt-3 p-2">
                                        <?php echo csrf_field(); ?>
                                        <div class="d-flex flex-wrap col-12">
                                            <?php $__currentLoopData = $city->regions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $region): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <div class="form-check col-sm-4 mb-sm-2">
                                                    <input
                                                        class="form-check-input"
                                                        type="checkbox"
                                                        name="regions[<?php echo e($region->id); ?>]"
                                                        value="<?php echo e($region->id); ?>"
                                                        id="flexCheckChecked"
                                                        <?php $__currentLoopData = $user->regions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $reg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <?php if($region->id == $reg->id): ?>
                                                        checked
                                                        <?php endif; ?>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    />
                                                    <label class="form-check-label" for="flexCheckChecked">
                                                        <?php echo e($region->name); ?>

                                                    </label>
                                                </div>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <button type="submit" class="btn btn-primary btn-block mt-3">ویرایش</button>
                    </form>
                </div>
            </div>
            </div>
        </section>
     <?php $__env->endSlot(); ?>
    <?php if(session()->get('status') == 'synced'): ?>
         <?php $__env->slot('linkScript'); ?>
            <script>
                Swal.fire({
                    icon: 'success',
                    text: 'ویرایش منطقه با موفقیت انجام شد',
                })
            </script>
         <?php $__env->endSlot(); ?>
    <?php endif; ?>
    <?php if(session()->get('status') == 'failed'): ?>
         <?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/experts/region_experts.blade.php ENDPATH**/ ?>
