<?php $__env->startSection('content'); ?>
    <h3 class="page-title"><?php echo app('translator')->get('quickadmin.residential-complex.title'); ?></h3>

    <?php echo Form::model($residential_complex, ['method' => 'PUT', 'route' => ['admin.residential_complexes.update', $residential_complex->id], 'files' => true,]); ?>


    <div class="panel panel-default">
        <div class="panel-heading">
            <?php echo app('translator')->get('quickadmin.qa_edit'); ?>
        </div>

        <div class="panel-body">
            <div class="row">
                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('name', trans('quickadmin.residential-complex.fields.name').'*', ['class' => 'control-label']); ?>

                    <?php echo Form::text('name', old('name'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('name')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('name')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('code', trans('quickadmin.residential-complex.fields.code').'*', ['class' => 'control-label']); ?>

                    <?php echo Form::text('code', old('code'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('code')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('code')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('developer_id', trans('quickadmin.residential-complex.fields.developer'), ['class' => 'control-label']); ?>


                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('developer_id', $developers, old('developer_id'), ['class' => 'form-control select2']); ?>

                    <?php else: ?>
                        <?php echo Form::select('developer_id', $developers, old('developer_id'), ['class' => 'form-control select2', "disabled"]); ?>

                        <?php echo Form::hidden('developer_id', old('developer_id')); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('developer_id')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('developer_id')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="flex-space-between">
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="enabled" value="0">
                                <?php echo Form::checkbox('enabled', 1, old('enabled'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.enabled'); ?>

                            <?php else: ?>
                                <?php echo Form::checkbox('enabled', 1, old('enabled'), ["disabled"]); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.enabled'); ?>
                                <input type="hidden" name="enabled" value="<?php if(old('enabled')): ?><?php echo e(old('enabled')); ?><?php else: ?><?php echo e($residential_complex->enabled); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('enabled')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('enabled')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">

                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_repair" value="0">
                                <?php echo Form::checkbox('is_repair', 1, old('is_repair'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is-repair'); ?>
                            <?php else: ?>
                                <?php echo Form::checkbox('is_repair', 1, old('is_repair'), ["disabled"]); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is-repair'); ?>

                                <input type="hidden" name="is_repair" value="<?php if(old('is_repair')): ?><?php echo e(old('is_repair')); ?><?php else: ?><?php echo e($residential_complex->is_repair); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>

                    <p class="help-block"></p>
                    <?php if($errors->has('is_repair')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_repair')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">

                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_credit" value="0">
                                <?php echo Form::checkbox('is_credit', 1, old('is_credit'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is-credit'); ?>

                            <?php else: ?>
                                <?php echo Form::checkbox('is_credit', 1, old('is_credit'), ["disabled"]); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is-credit'); ?>
                                <input type="hidden" name="is_credit" value="<?php if(old('is_credit')): ?><?php echo e(old('is_credit')); ?><?php else: ?><?php echo e($residential_complex->is_credit); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>

                    <p class="help-block"></p>
                    <?php if($errors->has('is_credit')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_credit')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">

                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_transport_hub" value="0">
                                <?php echo Form::checkbox('is_transport_hub', 1, old('is_transport_hub'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is-transport-hub'); ?>

                            <?php else: ?>
                                <?php echo Form::checkbox('is_transport_hub', 1, old('is_transport_hub'), ["disabled"]); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is-transport-hub'); ?>
                                <input type="hidden" name="is_transport_hub" value="<?php if(old('is_transport_hub')): ?><?php echo e(old('is_transport_hub')); ?><?php else: ?><?php echo e($residential_complex->is_transport_hub); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>

                    <p class="help-block"></p>
                    <?php if($errors->has('is_transport_hub')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_transport_hub')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="start_of_sale" value="0">
                                <?php echo Form::checkbox('start_of_sale', 1, old('start_of_sale'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.start_of_sale'); ?>

                            <?php else: ?>
                                <?php echo Form::checkbox('start_of_sale', 1, old('start_of_sale'), ["disabled"]); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.start_of_sale'); ?>
                                <input type="hidden" name="start_of_sale" value="<?php if(old('start_of_sale')): ?><?php echo e(old('start_of_sale')); ?><?php else: ?><?php echo e($residential_complex->start_of_sale); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('start_of_sale')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('start_of_sale')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">


                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="show_bank" value="0">

                                <?php echo Form::checkbox('show_bank', 1, old('show_bank'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.show-bank'); ?>
                            <?php else: ?>
                                <?php echo Form::checkbox('show_bank', 1, old('show_bank'), ["disabled"]); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.show-bank'); ?>
                                <input type="hidden" name="show_bank" value="<?php if(old('show_bank')): ?><?php echo e(old('show_bank')); ?><?php else: ?><?php echo e($residential_complex->show_bank); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('show_bank')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('show_bank')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 col-lg-8 form-group">
                    <?php echo Form::label('site_link', trans('quickadmin.residential-complex.fields.site-link').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('site_link', old('site_link'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('site_link', old('site_link'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('site_link')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('site_link')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('phone', trans('quickadmin.residential-complex.fields.phone').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('phone', old('phone'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('phone')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('phone')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 col-lg-12 form-group">
                    <?php echo Form::label('site_utm', trans('quickadmin.residential-complex.fields.site-utm').'', ['class' => 'control-label']); ?>

                        <?php echo Form::text('site_utm', old('site_utm'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('site_utm')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('site_utm')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('meta_title', trans('quickadmin.residential-complex.fields.meta-title').'', ['class' => 'control-label']); ?>

                    <?php echo Form::text('residential_complex_seos[id-'.$residential_complex->residential_complex_seos->first()->id.'][meta_title]', old('residential_complex_seos[0][meta_title]', isset($residential_complex) ? $residential_complex->residential_complex_seos->first()->meta_title: ''), ['class' => 'form-control', 'placeholder' => '']); ?>


                    <p class="help-block"></p>
                    <?php if($errors->has('meta_title')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('meta_title')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('meta_keywords', trans('quickadmin.residential-complex.fields.meta-keywords').'', ['class' => 'control-label']); ?>

                    <?php echo Form::text('residential_complex_seos[id-'.$residential_complex->residential_complex_seos->first()->id.'][meta_keywords]', old('residential_complex_seos[0][meta_keywords]', isset($residential_complex) ? $residential_complex->residential_complex_seos->first()->meta_keywords: ''), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('meta_keywords')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('meta_keywords')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('meta_description', trans('quickadmin.residential-complex.fields.meta-description').'', ['class' => 'control-label']); ?>

                    <?php echo Form::text('residential_complex_seos[id-'.$residential_complex->residential_complex_seos->first()->id.'][meta_description]', old('residential_complex_seos[0][meta_description]', isset($residential_complex) ? $residential_complex->residential_complex_seos->first()->meta_description: ''), ['class' => 'form-control', 'placeholder' => '']); ?>


                    <p class="help-block"></p>
                    <?php if($errors->has('meta_description')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('meta_description')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('seo_text', trans('quickadmin.residential-complex.fields.seo-text').'', ['class' => 'control-label', ]); ?>


                    <?php echo Form::textarea('residential_complex_seos[id-'.$residential_complex->residential_complex_seos->first()->id.'][seo_text]', old('residential_complex_seos[0][seo_text]', isset($residential_complex) ? $residential_complex->residential_complex_seos->first()->seo_text: ''), ['id' => 'seo_text', 'rows' => 4, 'style' => 'resize:none; visibility: hidden;', 'class' => 'form-control', 'placeholder' => '']); ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('seo_text')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('seo_text')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-lg-2 form-group">
                    <?php echo Form::label('main_page_priority', trans('quickadmin.residential-complex.fields.main-page-priority').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::number('main_page_priority', old('main_page_priority'), ['class' => 'form-control', 'placeholder' => '', 'min'=>0]); ?>

                    <?php else: ?>
                        <?php echo Form::number('main_page_priority', old('main_page_priority'), ['class' => 'form-control', "readonly", 'placeholder' => '', 'min'=>0]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('main_page_priority')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('main_page_priority')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-2 form-group">
                    <?php echo Form::label('res_com_page_priority', trans('quickadmin.residential-complex.fields.res-com-page-priority').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::number('res_com_page_priority', old('res_com_page_priority'), ['class' => 'form-control', 'placeholder' => '', 'min'=>0]); ?>

                    <?php else: ?>
                        <?php echo Form::number('res_com_page_priority', old('res_com_page_priority'), ['class' => 'form-control', "readonly", 'placeholder' => '', 'min'=>0]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('res_com_page_priority')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('res_com_page_priority')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('building_put_into_operation', trans('quickadmin.residential-complex.fields.building_put_into_operation').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('building_put_into_operation', old('building_put_into_operation'), ['class' => 'form-control', 'placeholder' => '', 'min'=>0]); ?>

                    <?php else: ?>
                        <?php echo Form::text('building_put_into_operation', old('building_put_into_operation'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('building_put_into_operation')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('building_put_into_operation')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-lg-3">
                    <?php echo Form::label('date_putting_into_operation', trans('quickadmin.residential-complex.fields.date-putting-into-operation').'', ['class' => 'control-label']); ?>

                </div>

                <div class="col-xs-2">
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('date_putting_into_operation', old('date_putting_into_operation'), ['class' => 'form-control date text-align-center', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('date_putting_into_operation', old('date_putting_into_operation'), ['class' => 'form-control date', "readonly", 'placeholder' => '']); ?>

                        <?php echo Form::hidden('date_putting_into_operation', old('date_putting_into_operation')); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('date_putting_into_operation')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('date_putting_into_operation')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-2">
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('quarterly_putting_into_operation_id', $quarterly, old('quarterly_putting_into_operation_id'), ['class' => 'form-control select2']); ?>

                    <?php else: ?>
                        <?php echo Form::select('quarterly_putting_into_operation_id', $quarterly, old('quarterly_putting_into_operation_id'), ['class' => 'form-control select2', "disabled"]); ?>

                        <?php echo Form::hidden('quarterly_putting_into_operation_id', old('quarterly_putting_into_operation_id')); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('quarterly_putting_into_operation_id')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('quarterly_putting_into_operation_id')); ?>

                        </p>
                    <?php endif; ?>
                </div>


            </div>

            <div class="row">
                <div class="col-xs-12 col-lg-3 form-group">
                    <?php echo Form::label('building_count', trans('quickadmin.residential-complex.fields.building-count').'*', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::number('building_count', old('building_count'), ['class' => 'form-control', 'placeholder' => '', 'min'=>0]); ?>

                    <?php else: ?>
                        <?php echo Form::number('building_count', old('building_count'), ['class' => 'form-control', 'placeholder' => '', "readonly", 'min'=>0]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('building_count')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('building_count')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-3 form-group">
                    <?php echo Form::label('min_price', trans('quickadmin.residential-complex.fields.min-price').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('min_price', old('min_price'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('min_price', old('min_price'), ['class' => 'form-control', 'placeholder' => '', "readonly"]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('min_price')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('min_price')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-3 form-group">
                    <?php echo Form::label('room_count', trans('quickadmin.residential-complex.fields.room-count').'*', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::number('room_count', old('room_count'), ['class' => 'form-control', 'placeholder' => '', 'min'=>0]); ?>

                    <?php else: ?>
                        <?php echo Form::number('room_count', old('room_count'), ['class' => 'form-control', 'placeholder' => '', "readonly", 'min'=>0]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('room_count')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('room_count')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-3 form-group">
                    <?php echo Form::label('room_count_date', trans('quickadmin.residential-complex.fields.room-count-date').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('room_count_date', old('room_count_date'), ['class' => 'form-control date-time', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('room_count_date', old('room_count_date'), ['class' => 'form-control date-time', "readonly", 'placeholder' => '']); ?>

                        <?php echo Form::hidden('room_count_date', old('room_count_date')); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('room_count_date')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('room_count_date')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                

                
                
                
                
                
                
                

                
                
                
                
                
                
                
                
                
                

                
                
                
                
                
                
                
                
                
                
                
                
                
                


            </div>

            <div class="row">
                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('price_info', trans('quickadmin.residential-complex.fields.price-info').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('price_info', old('price_info'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('price_info', old('price_info'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('price_info')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('price_info')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('building_status_info', trans('quickadmin.residential-complex.fields.building-status-info').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('building_status_info', old('building_status_info'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('building_status_info', old('building_status_info'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('building_status_info')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('building_status_info')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('planning_info', trans('quickadmin.residential-complex.fields.planning-info').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('planning_info', old('planning_info'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('planning_info', old('planning_info'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('planning_info')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('planning_info')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('document_info', trans('quickadmin.residential-complex.fields.document-info').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('document_info', old('document_info'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('document_info', old('document_info'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('document_info')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('document_info')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="flex-space-between">
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_show_consultation" value="0">
                                <?php echo Form::checkbox('is_show_consultation', 1, old('is_show_consultation', old('is_show_consultation')), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_consultation'); ?>
                            <?php else: ?>
                                <?php echo Form::checkbox('is_show_consultation', 1, old('is_show_consultation'), ['disabled']); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_consultation'); ?>
                                <input type="hidden" name="is_show_consultation" value="<?php if(old('is_show_consultation')): ?><?php echo e(old('is_show_consultation')); ?><?php else: ?><?php echo e($residential_complex->is_show_consultation); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('is_show_consultation')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_show_consultation')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_show_presentation" value="0">
                                <?php echo Form::checkbox('is_show_presentation', 1, old('is_show_presentation', old('is_show_consultation')), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_presentation'); ?>

                            <?php else: ?>
                                <?php echo Form::checkbox('is_show_presentation', 1, old('is_show_presentation',old('is_show_consultation') ), ['disabled']); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_presentation'); ?>
                                <input type="hidden" name="is_show_presentation" value="<?php if(old('is_show_presentation')): ?><?php echo e(old('is_show_presentation')); ?><?php else: ?><?php echo e($residential_complex->is_show_presentation); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('is_show_presentation')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_show_presentation')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">
                            

                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_show_telegram" value="0">

                                <?php echo Form::checkbox('is_show_telegram', 1, old('is_show_telegram', old('is_show_telegram')), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_telegram'); ?>
                            <?php else: ?>
                                <?php echo Form::checkbox('is_show_telegram', 1, old('is_show_telegram', old('is_show_telegram')), ['disabled']); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_telegram'); ?>
                                <input type="hidden" name="is_show_telegram" value="<?php if(old('is_show_telegram')): ?><?php echo e(old('is_show_telegram')); ?><?php else: ?><?php echo e($residential_complex->is_show_telegram); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('is_show_telegram')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_show_telegram')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">
                            
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_show_viber" value="0">

                                <?php echo Form::checkbox('is_show_viber', 1, old('is_show_viber', old('is_show_viber')), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_viber'); ?>

                            <?php else: ?>
                                <?php echo Form::checkbox('is_show_viber', 1, old('is_show_viber', old('is_show_viber')), ['disabled']); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_viber'); ?>
                                <input type="hidden" name="is_show_viber" value="<?php if(old('is_show_viber')): ?><?php echo e(old('is_show_viber')); ?><?php else: ?><?php echo e($residential_complex->is_show_viber); ?> <?php endif; ?>">
                            <?php endif; ?>
                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('is_show_viber')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_show_viber')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">
                            
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_show_skype" value="0">

                                <?php echo Form::checkbox('is_show_skype', 1, old('is_show_skype', old('is_show_skype')), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_skype'); ?>

                            <?php else: ?>
                                <?php echo Form::checkbox('is_show_skype', 1, old('is_show_skype', old('is_show_skype')), ['disabled']); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_skype'); ?>
                                <input type="hidden" name="is_show_skype" value="<?php if(old('is_show_skype')): ?><?php echo e(old('is_show_skype')); ?><?php else: ?><?php echo e($residential_complex->is_show_skype); ?> <?php endif; ?>">
                            <?php endif; ?>

                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('is_show_skype')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_show_skype')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="form-group">
                    <div class="checkbox">
                        <label class="control-label">
                            

                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <input type="hidden" name="is_show_whatsapp" value="0">

                                <?php echo Form::checkbox('is_show_whatsapp', 1, old('is_show_whatsapp', old('is_show_whatsapp')), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_whatsapp'); ?>

                            <?php else: ?>
                                <?php echo Form::checkbox('is_show_whatsapp', 1, old('is_show_whatsapp', old('is_show_whatsapp')), ['disabled']); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_whatsapp'); ?>
                                <input type="hidden" name="is_show_whatsapp" value="<?php if(old('is_show_whatsapp')): ?><?php echo e(old('is_show_whatsapp')); ?><?php else: ?><?php echo e($residential_complex->is_show_whatsapp); ?> <?php endif; ?>">
                            <?php endif; ?>

                        </label>
                    </div>
                    <p class="help-block"></p>
                    <?php if($errors->has('is_show_whatsapp')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('is_show_whatsapp')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <?php if($errors->has('contact_error')): ?>
                        <p class="help-block" style="text-align: center">
                            <?php echo e($errors->first('contact_error')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-lg-12 form-group">
                    <?php echo Form::label('consultation_description', trans('quickadmin.residential-complex.fields.consultation_description').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('consultation_description', old('consultation_description'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('consultation_description', old('consultation_description'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('consultation_description')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('consultation_description')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">

                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('consultation_button_text', trans('quickadmin.residential-complex.fields.consultation_button_text').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('consultation_button_text', old('consultation_button_text'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('consultation_button_text', old('consultation_button_text'), ['class' => 'form-control', "readonly", 'placeholder' => '']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('consultation_button_text')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('consultation_button_text')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('consultation_button_color', trans('quickadmin.residential-complex.fields.consultation_button_color'), ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <input type="color" id="head" name="consultation_button_color" class="form-control" value="<?php echo e($residential_complex->consultation_button_color); ?>">
                    <?php else: ?>
                        <input type="color" id="head" name="consultation_button_color" class="form-control" readonly="readonly" value="<?php echo e($residential_complex->consultation_button_color); ?>">
                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('consultation_button_color')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('consultation_button_color')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row flex-align-end">
                <div class="col-xs-12 col-lg-4 form-group">
                    <?php if($residential_complex->presentation): ?>
                        <a href="<?php echo e(asset(env('UPLOAD_PATH').'/'. \App\Helpers\ImageSize::PRESENTATION .'/'.  $residential_complex->presentation)); ?>"
                           target="_blank">Завантажити
                            документ</a>
                        <p></p>
                    <?php endif; ?>

                    <label for='presentation' class="btn btn-info btn-lg">
                        <?php echo app('translator')->get('quickadmin.residential-complex.fields.presentation'); ?>
                        <span class="glyphicon glyphicon-arrow-up"></span>
                    </label>
                    <?php echo Form::hidden('presentation', old('presentation')); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::file('presentation', ['class' => 'form-control up-document hidden', 'id'=>'presentation']); ?>

                    <?php else: ?>
                        <?php echo Form::file('presentation', ['class' => 'form-control up-document hidden', 'id'=>'presentation',"disabled" => "disabled"]); ?>

                    <?php endif; ?>


                    <?php echo Form::hidden('presentation_max_size', 7); ?>

                    <p class="help-block"></p>
                    <div class="preview-document"></div>
                    <?php if($errors->has('presentation')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('presentation')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('email', trans('quickadmin.residential-complex.fields.email').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('email', old('email'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('email', old('email'), ['class' => 'form-control', 'placeholder' => '', "readonly"]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('email')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('email')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('whatsapp', trans('quickadmin.residential-complex.fields.whatsapp').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('whatsapp', old('whatsapp'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('whatsapp', old('whatsapp'), ['class' => 'form-control', 'placeholder' => '', "readonly"]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('whatsapp')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('whatsapp')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('telegram', trans('quickadmin.residential-complex.fields.telegram').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('telegram', old('telegram'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('telegram', old('telegram'), ['class' => 'form-control', 'placeholder' => "", 'readonly']); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('telegram')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('telegram')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('viber', trans('quickadmin.residential-complex.fields.viber').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('viber', old('viber'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('viber', old('viber'), ['class' => 'form-control', 'placeholder' => "", 'readonly' ]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('viber')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('viber')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-4 form-group">
                    <?php echo Form::label('skype', trans('quickadmin.residential-complex.fields.skype').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('skype', old('skype'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('skype', old('skype'), ['class' => 'form-control', 'placeholder' => "", 'readonly' ]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('skype')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('skype')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>


            <div class="row">
                <div class="col-xs-12 col-lg-3 form-group">
                    <?php echo Form::label('city_id', trans('quickadmin.residential-complex.fields.city').'*', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('city_id', $cities, old('city_id'), ['class' => 'form-control select2']); ?>

                    <?php else: ?>
                        <?php echo Form::select('city_id', $cities, old('city_id'), ['class' => 'form-control select2', "disabled"]); ?>

                        <?php echo Form::hidden('city_id', old('city_id')); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('city_id')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('city_id')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-3 form-group">
                    <?php echo Form::label('district_id', trans('quickadmin.residential-complex.fields.district').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('district_id', $districts, old('district_id'), ['class' => 'form-control select2']); ?>

                    <?php else: ?>
                        <?php echo Form::select('district_id', $districts, old('district_id'), ['class' => 'form-control select2', "disabled"]); ?>

                        <?php echo Form::hidden('district_id', old('district_id')); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('district_id')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('district_id')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-3 form-group">
                    <?php echo Form::label('street_name_id', trans('quickadmin.residential-complex.fields.street-name').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('street_name_id', $street_names, old('street_name_id'), ['class' => 'form-control select2' ]); ?>

                    <?php else: ?>
                        <?php echo Form::select('street_name_id', $street_names, old('street_name_id'), ['class' => 'form-control select2', "disabled"]); ?>

                        <?php echo Form::hidden('street_name_id', old('district_id')); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('street_name_id')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('street_name_id')); ?>

                        </p>
                    <?php endif; ?>
                </div>
                <div class="col-xs-12 col-lg-3 form-group">
                    <?php echo Form::label('street_number', trans('quickadmin.residential-complex.fields.street-number').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('street_number', old('street_number'), ['class' => 'form-control', 'placeholder' => '']); ?>

                    <?php else: ?>
                        <?php echo Form::text('street_number', old('street_number'), ['class' => 'form-control', 'placeholder' => '', "readonly"]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('street_number')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('street_number')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('class', trans('quickadmin.residential-complex.fields.class').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <button type="button" class="btn btn-primary btn-xs" id="selectbtn-class">
                            <?php echo e(trans('quickadmin.qa_select_all')); ?>

                        </button>
                        <button type="button" class="btn btn-primary btn-xs" id="deselectbtn-class">
                            <?php echo e(trans('quickadmin.qa_deselect_all')); ?>

                        </button>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('class[]', $classes, old('class') ? old('class') : $residential_complex->class->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-class' ]); ?>

                    <?php else: ?>
                        <?php echo Form::select('class[]', $classes, old('class') ? old('class') : $residential_complex->class->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', "disabled", 'id' => 'selectall-class' ]); ?>

                        <?php $__currentLoopData = $residential_complex->class->pluck('id')->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $class): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php echo Form::hidden('class[]', $class); ?>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('class')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('class')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('stage_of_construction_id', trans('quickadmin.section.fields.stage-of-construction').'*', ['class' => 'control-label']); ?>



                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('stage_of_construction_id', $stage_of_constructions, old('stage_of_construction_id'), ['class' => 'form-control select2', ]); ?>

                    <?php else: ?>
                        <?php echo Form::select('stage_of_construction_id', $stage_of_constructions, old('stage_of_construction_id'), ['class' => 'form-control select2', "disabled"]); ?>

                        <?php echo Form::hidden('stage_of_construction_id', old('stage_of_construction_id')); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('stage_of_construction_id')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('stage_of_construction_id')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('heating', trans('quickadmin.residential-complex.fields.heating').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <button type="button" class="btn btn-primary btn-xs" id="selectbtn-heating">
                            <?php echo e(trans('quickadmin.qa_select_all')); ?>

                        </button>
                        <button type="button" class="btn btn-primary btn-xs" id="deselectbtn-heating">
                            <?php echo e(trans('quickadmin.qa_deselect_all')); ?>

                        </button>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('heating[]', $heatings, old('heating') ? old('heating') : $residential_complex->heating->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-heating' ]); ?>

                        <p class="help-block"></p>
                    <?php else: ?>

                        <?php echo Form::select('heating[]', $heatings, old('heating') ? old('heating') : $residential_complex->heating->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-heating', "disabled"]); ?>


                        <?php $__currentLoopData = $residential_complex->heating->pluck('id')->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $heating): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php echo Form::hidden('heating[]', $heating); ?>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <p class="help-block"></p>
                    <?php endif; ?>
                    <?php if($errors->has('heating')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('heating')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('technology_building', trans('quickadmin.residential-complex.fields.technology-building').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <button type="button" class="btn btn-primary btn-xs" id="selectbtn-technology_building">
                            <?php echo e(trans('quickadmin.qa_select_all')); ?>

                        </button>
                        <button type="button" class="btn btn-primary btn-xs" id="deselectbtn-technology_building">
                            <?php echo e(trans('quickadmin.qa_deselect_all')); ?>

                        </button>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('technology_building[]', $technology_buildings, old('technology_building') ? old('technology_building') : $residential_complex->technology_building->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-technology_building' ]); ?>

                    <?php else: ?>
                        <?php echo Form::select('technology_building[]', $technology_buildings, old('technology_building') ? old('technology_building') : $residential_complex->technology_building->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-technology_building' ]); ?>

                        <?php $__currentLoopData = $residential_complex->technology_building->pluck('id')->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $technology_building): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php echo Form::hidden('technology_building[]', $technology_building); ?>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('technology_building')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('technology_building')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('other_option', trans('quickadmin.residential-complex.fields.other-option').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <button type="button" class="btn btn-primary btn-xs" id="selectbtn-other_option">
                            <?php echo e(trans('quickadmin.qa_select_all')); ?>

                        </button>
                        <button type="button" class="btn btn-primary btn-xs" id="deselectbtn-other_option">
                            <?php echo e(trans('quickadmin.qa_deselect_all')); ?>

                        </button>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('other_option[]', $other_options, old('other_option') ? old('other_option') : $residential_complex->other_option->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-other_option' ]); ?>

                    <?php else: ?>
                        <?php echo Form::select('other_option[]', $other_options, old('other_option') ? old('other_option') : $residential_complex->other_option->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', "disabled", 'id' => 'selectall-other_option' ]); ?>

                        <?php $__currentLoopData = $residential_complex->other_option->pluck('id')->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $other_option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php echo Form::hidden('other_option[]', $other_option); ?>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('other_option')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('other_option')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('preview', trans('quickadmin.residential-complex.fields.preview'), ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('preview', old('preview'), ['class' => 'form-control', 'placeholder' => '', ]); ?>

                    <?php else: ?>
                        <?php echo Form::text('preview', old('preview'), ['class' => 'form-control', 'placeholder' => '', "readonly"]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('preview')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('preview')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('preview_color_picker', trans('quickadmin.residential-complex.fields.preview-color-picker'), ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <input type="color" id="head" name="preview_color_picker" class="form-control" value="<?php echo e($residential_complex->preview_color_picker); ?>">
                    <?php else: ?>
                        <input type="color" id="head" name="preview_color_picker" class="form-control" value="<?php echo e($residential_complex->preview_color_picker); ?>" readonly="readonly">
                    <?php endif; ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('preview_color_picker')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('preview_color_picker')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('plajka', trans('quickadmin.promotion.fields.plajka').'*', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('plajka', old('plajka'), ['class' => 'form-control', 'placeholder' => '', ]); ?>

                    <?php else: ?>
                        <?php echo Form::text('plajka', old('plajka'), ['class' => 'form-control', 'placeholder' => '', "readonly"]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('plajka')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('plajka')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-12 col-lg-6 form-group">
                    <?php echo Form::label('color_picker', trans('quickadmin.promotion.fields.color-picker').'*', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <input type="color" id="head" name="color_picker" class="form-control" value="<?php echo e($residential_complex->color_picker); ?>">
                    <?php else: ?>
                        <input type="color" id="head" name="color_picker" class="form-control" value="<?php echo e($residential_complex->color_picker); ?>" readonly="readonly">
                    <?php endif; ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('color_picker')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('color_picker')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 form-group">
                    <label for='photo' class="btn btn-info btn-info-rc btn-lg">
                        <?php echo app('translator')->get('quickadmin.residential-complex.fields.photo'); ?>
                        <span class="glyphicon glyphicon-arrow-up"></span>
                    </label>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::file('photo[]', [
                            'multiple',
                            'class' => 'form-control file-upload hidden',
                            'id' => 'photo',
                            'data-url' => route('admin.media.upload'),
                            'data-bucket' => 'photo',
                            'data-filekey' => 'photo',
                            ]); ?>

                    <?php else: ?>
                        <?php echo Form::file('photo[]', [
                        'multiple',
                        'class' => 'form-control file-upload hidden',
                        'data-url' => route('admin.media.upload'),
                        'data-bucket' => 'photo',
                        'data-filekey' => 'photo',
                        "disabled" => "disabled"
                        ]); ?>

                    <?php endif; ?>
                    <div class="checkbox">
                        <label class="control-label">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                <?php echo Form::hidden('use_cropper', 1); ?>

                                <?php echo Form::checkbox('use_cropper', 1, old('use_cropper', true), [
                                'id' => 'use_cropper'
                                ]); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.use_cropper'); ?>
                            <?php else: ?>
                                <?php echo Form::hidden('use_cropper', 1); ?>

                                <?php echo Form::checkbox('use_cropper', 1, old('use_cropper', true), [
                                "disabled",
                                'id' => 'use_cropper'
                                ]); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.use_cropper'); ?>
                            <?php endif; ?>
                        </label>
                    </div>
                    <p class="help-block"></p>
                    <div class="preview"></div>
                    <div class="photo-block">
                        <div class="progress-bar form-group">&nbsp;</div>
                        <div class="files-list">
                            <?php $__currentLoopData = $residential_complex->getMedia('photo'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $media): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <p class="form-group">

                                    <a href="<?php echo e(asset($media->getUrl())); ?>" target="_blank"><?php echo e($media->file_name); ?>

                                        (<?php echo e($media->size); ?> bytes)</a>

                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                        <a href="#" class="btn btn-xs btn-danger remove-file">Видалити</a>
                                    <?php endif; ?>
                                    <input type="hidden" name="photo_id[]" value="<?php echo e($media->id); ?>">
                                </p>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>
                    <?php if($errors->has('photo')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('photo')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 form-group">
                    <label for='landscape_photo' class="btn btn-info btn-info-rc btn-lg">
                        <?php echo app('translator')->get('quickadmin.residential-complex.fields.landscape-photo'); ?>
                        <span class="glyphicon glyphicon-arrow-up"></span>
                    </label>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::file('landscape_photo[]', [
                            'multiple',
                            'class' => 'form-control file-upload-landscape hidden',
                            'id' => 'landscape_photo',
                            'data-url' => route('admin.media.upload'),
                            'data-bucket' => 'landscape_photo',
                            'data-filekey' => 'landscape_photo',
                            ]); ?>

                    <?php else: ?>
                        <?php echo Form::file('landscape_photo[]', [
                        'multiple',
                        'id' => 'landscape_photo',
                        'class' => 'form-control file-upload hidden',
                        'data-url' => route('admin.media.upload'),
                        'data-bucket' => 'landscape_photo',
                        'data-filekey' => 'landscape_photo',
                        "disabled" => "disabled"
                        ]); ?>

                    <?php endif; ?>

                    <p class="help-block"></p>
                    <div class="photo-block">
                        <div class="progress-bar form-group">&nbsp;</div>
                        <div class="files-list">
                            <?php $__currentLoopData = $residential_complex->getMedia('landscape_photo'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $media): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <p class="form-group">
                                    <a href="<?php echo e(asset($media->getUrl())); ?>" target="_blank"><?php echo e($media->name); ?>

                                        (<?php echo e($media->size); ?> bytes)</a>
                                    <a href="#" class="btn btn-xs btn-danger remove-file">Видалити</a>
                                    <input type="hidden" name="landscape_photo_id[]" value="<?php echo e($media->id); ?>">
                                </p>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>
                    <?php if($errors->has('landscape_photo')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('landscape_photo')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('icon', trans('quickadmin.residential-complex.fields.icon').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        
                        
                        
                        <button type="button" class="btn btn-primary btn-xs" id="deselectbtn-icon">
                            <?php echo e(trans('quickadmin.qa_deselect_all')); ?>

                        </button>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('icon[]', $icons, old('icon') ? old('icon') : $residential_complex->icon->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-icon' ]); ?>

                    <?php else: ?>
                        <?php echo Form::select('icon[]', $icons, old('icon') ? old('icon') : $residential_complex->icon->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', "disabled", 'id' => 'selectall-icon' ]); ?>

                        <?php $__currentLoopData = $residential_complex->icon->pluck('id')->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $icon): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php echo Form::hidden('icon[]', $icon); ?>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('icon')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('icon')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('recomended_residental_complex_id', trans('quickadmin.residential-complex.fields.recomended-residental-complex-id').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <button type="button" class="btn btn-primary btn-xs"
                                id="selectbtn-recomended_residental_complex_id">
                            <?php echo e(trans('quickadmin.qa_select_all')); ?>

                        </button>
                        <button type="button" class="btn btn-primary btn-xs"
                                id="deselectbtn-recomended_residental_complex_id">
                            <?php echo e(trans('quickadmin.qa_deselect_all')); ?>

                        </button>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('recomended_residental_complex_id[]', $recomended_residental_complex_ids, old('recomended_residental_complex_id') ? old('recomended_residental_complex_id') : $residential_complex->recomended_residental_complex_id->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-recomended_residental_complex_id' ]); ?>

                    <?php else: ?>
                        <?php echo Form::select('recomended_residental_complex_id[]', $recomended_residental_complex_ids, old('recomended_residental_complex_id') ? old('recomended_residental_complex_id') : $residential_complex->recomended_residental_complex_id->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', "disabled", 'id' => 'selectall-recomended_residental_complex_id' ]); ?>

                        <?php $__currentLoopData = $residential_complex->recomended_residental_complex_id->pluck('id')->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $recomended_residental_complex_id): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php echo Form::hidden('recomended_residental_complex_id[]', $recomended_residental_complex_id); ?>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('recomended_residental_complex_id')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('recomended_residental_complex_id')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('bank', trans('quickadmin.residential-complex.fields.bank').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <button type="button" class="btn btn-primary btn-xs" id="selectbtn-bank">
                            <?php echo e(trans('quickadmin.qa_select_all')); ?>

                        </button>
                        <button type="button" class="btn btn-primary btn-xs" id="deselectbtn-bank">
                            <?php echo e(trans('quickadmin.qa_deselect_all')); ?>

                        </button>
                    <?php endif; ?>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::select('bank[]', $banks, old('bank') ? old('bank') : $residential_complex->bank->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-bank' ]); ?>

                    <?php else: ?>
                        <?php echo Form::select('bank[]', $banks, old('bank') ? old('bank') : $residential_complex->bank->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-bank', "disabled" ]); ?>

                        <?php $__currentLoopData = $residential_complex->recomended_residental_complex_id->pluck('id')->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $recomended_residental_complex_id): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php echo Form::hidden('recomended_residental_complex_id[]', $recomended_residental_complex_id); ?>

                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('bank')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('bank')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 form-group">
                    <?php echo Form::label('location_address', trans('quickadmin.residential-complex.fields.location').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('location_address', old('location_address'), ['class' => 'form-control map-input', 'id' => 'location-input']); ?>

                    <?php else: ?>
                        <?php echo Form::text('location_address', old('location_address'), ['class' => 'form-control map-input', 'id' => 'location-input', "readonly"]); ?>

                    <?php endif; ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('location')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('location')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div class="row">
                <div class="col-xs-12 col-xs-6 form-group">
                    <?php echo Form::label('location_latitude', trans('quickadmin.residential-complex.fields.location_latitude').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('location_latitude', old('location_latitude'), ['class' => 'form-control', 'id' => 'location-latitude']); ?>

                    <?php else: ?>
                        <?php echo Form::text('location_latitude', old('location_latitude'), ['class' => 'form-control', 'id' => 'location-latitude', "readonly"]); ?>

                    <?php endif; ?>
                    <p class="help-block"></p>
                    <?php if($errors->has('location_latitude')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('location_latitude')); ?>

                        </p>
                    <?php endif; ?>
                </div>

                <div class="col-xs-12 col-xs-6  form-group">
                    <?php echo Form::label('location_longitude', trans('quickadmin.residential-complex.fields.location_longitude').'', ['class' => 'control-label']); ?>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <?php echo Form::text('location_longitude', old('location_longitude'), ['class' => 'form-control', 'id' => 'location-longitude']); ?>

                    <?php else: ?>
                        <?php echo Form::text('location_longitude', old('location_longitude'), ['class' => 'form-control', 'id' => 'location-longitude', "readonly"]); ?>

                    <?php endif; ?>

                    <p class="help-block"></p>
                    <?php if($errors->has('location_longitude')): ?>
                        <p class="help-block">
                            <?php echo e($errors->first('location_longitude')); ?>

                        </p>
                    <?php endif; ?>
                </div>
            </div>

            <div id="location-map-container" style="width:100%;height:200px; ">
                <div style="width: 100%; height: 100%" id="location-map"></div>
            </div>

        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading">
            Характеристики
        </div>
        <div class="panel-body">
            <table class="table table-bordered table-striped">
                <thead>
                <tr>
                    <th><?php echo app('translator')->get('quickadmin.residential-complex-character.fields.type'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.residential-complex-character.fields.value'); ?></th>

                    <th><?php echo app('translator')->get('quickadmin.qa_actions'); ?></th>
                </tr>
                </thead>
                <tbody id="kharakteristiki">
                <?php $__empty_1 = true; $__currentLoopData = old('residential_complex_characters', []); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php echo $__env->make('admin.residential_complexes.residential_complex_characters_row', [
                        'index' => $index
                    ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <?php $__currentLoopData = $residential_complex->residential_complex_characters; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php echo $__env->make('admin.residential_complexes.residential_complex_characters_row', [
                            'index' => 'id-' . $item->id,
                            'field' => $item
                        ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
                </tbody>
            </table>
            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                <a href="#" class="btn btn-success pull-right add-new"><?php echo app('translator')->get('quickadmin.qa_add_new'); ?></a>
            <?php endif; ?>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading">
            <div class="row flex-align-center">
                <div class="col-lg-8">Ціноутворення ЖК</div>

                <div class="col-lg-3 pull-right">
                    <div class="form-group" style="text-align: end; margin-right: 20px;">
                        <div class="checkbox">
                            <label class="control-label">

                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                    <input type="hidden" name="is_show_price" value="0">
                                    <?php echo Form::checkbox('is_show_price', 1, old('is_show_price'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_price'); ?>
                                <?php else: ?>
                                    
                                    <input type="hidden" name="is_show_price" value="<?php if(old('is_show_price')): ?><?php echo e(old('is_show_price')); ?><?php else: ?><?php echo e($residential_complex->is_show_price); ?> <?php endif; ?>">
                                <?php endif; ?>
                            </label>
                        </div>

                        <p class="help-block"></p>
                        <?php if($errors->has('is_show_price')): ?>
                            <p class="help-block">
                                <?php echo e($errors->first('is_show_price')); ?>

                            </p>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="col-lg-1 pull-right">
                    
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                    <a href="<?php echo e(route('admin.residential_complexes.price',[$residential_complex->id])); ?>"
                       class="btn btn-primary pull-right add-new">Згенерувати</a>
                        <?php endif; ?>
                </div>
            </div>
        </div>

        <div class="panel-body">
            <table class="table table-bordered table-striped">
                <thead>
                <tr>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.section'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.room-count'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.room-type'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.min-space'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.max-space'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.price-per-squera-meter'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.price-per-squera-meter_max'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.min-price'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.max-price'); ?></th>
                    

                    <th>Дія</th>
                </tr>
                </thead>
                <tbody id="tsinoutvorennya-zhk">

                <?php $__empty_1 = true; $__currentLoopData = old('prices', []); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php echo $__env->make('admin.residential_complexes.prices_row', [
                        'index' => $index,

                    ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <?php $__currentLoopData = $residential_complex->prices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php echo $__env->make('admin.residential_complexes.prices_row', [
                            'index' => 'id-' . $item->id,
                            'field' => $item,

                        ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
                </tbody>
            </table>
            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                <a href="#" class="btn btn-success pull-right add-new"><?php echo app('translator')->get('quickadmin.qa_add_new'); ?></a>
            <?php endif; ?>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading">
            <div class="row flex-align-center">
                <div class="col-lg-9">Планування ЖК</div>

                <div class="col-lg-2 pull-right">
                    <div class="form-group">
                        <div class="checkbox">
                            <label class="control-label">

                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                    <input type="hidden" name="is_show_planning" value="0">
                                    <?php echo Form::checkbox('is_show_planning', 1, old('is_show_planning'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_planning'); ?>
                                <?php else: ?>
                                    
                                    <input type="hidden" name="is_show_planning" value="<?php if(old('is_show_planning')): ?><?php echo e(old('is_show_planning')); ?><?php else: ?><?php echo e($residential_complex->is_show_planning); ?> <?php endif; ?>">
                                <?php endif; ?>
                            </label>
                        </div>

                        <p class="help-block"></p>
                        <?php if($errors->has('is_show_planning')): ?>
                            <p class="help-block">
                                <?php echo e($errors->first('is_show_planning')); ?>

                            </p>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="col-lg-1 pull-right">
                    
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                        <a href="<?php echo e(route('admin.residential_complexes.planning-price',[$residential_complex->id])); ?>"
                           class="btn btn-primary pull-right add-new">Згенерувати</a>
                    <?php endif; ?>
                </div>
            </div>
        </div>

        <div class="panel-body">
            <table class="table table-bordered table-striped">
                <thead>
                <tr>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.section'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.room-count'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.room-type'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.min-space'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.max-space'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.price-per-squera-meter'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.price-per-squera-meter_max'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.min-price'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.price.fields.max-price'); ?></th>
                    

                    <th>Дія</th>
                </tr>
                </thead>
                <tbody id="planning-prices-zhk">

                <?php $__empty_1 = true; $__currentLoopData = old('planning_prices', []); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php echo $__env->make('admin.residential_complexes.planning_prices_row', [
                        'index' => $index,

                    ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <?php $__currentLoopData = $residential_complex->planning_prices; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php echo $__env->make('admin.residential_complexes.planning_prices_row', [
                            'index' => 'id-' . $item->id,
                            'field' => $item,

                        ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
                </tbody>
            </table>
            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                <a href="#" class="btn btn-success pull-right add-new"><?php echo app('translator')->get('quickadmin.qa_add_new'); ?></a>
            <?php endif; ?>
        </div>
    </div>

    <div class="panel panel-default">
        <div class="panel-heading">
            <div class="row flex-align-center">
                <div class="col-lg-8">Умови купівлі</div>

                <div class="col-lg-4 pull-right">
                    <div class="form-group" style="text-align: end; margin-right: 20px;">
                        <div class="checkbox">
                            <label class="control-label">

                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                                    <input type="hidden" name="is_show_terms_of_payments" value="0">
                                    <?php echo Form::checkbox('is_show_terms_of_payments', 1, old('is_show_terms_of_payments'), []); ?> <?php echo app('translator')->get('quickadmin.residential-complex.fields.is_show_terms_of_payments'); ?>
                                <?php else: ?>
                                    
                                    <input type="hidden" name="is_show_terms_of_payments"
                                           value="<?php if(old('is_show_terms_of_payments')): ?><?php echo e(old('is_show_terms_of_payments')); ?><?php else: ?><?php echo e($residential_complex->is_show_terms_of_payments); ?> <?php endif; ?>">
                                <?php endif; ?>
                            </label>
                        </div>

                        <p class="help-block"></p>
                        <?php if($errors->has('is_show_terms_of_payments')): ?>
                            <p class="help-block">
                                <?php echo e($errors->first('is_show_terms_of_payments')); ?>

                            </p>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>

        <div class="panel-body">

            <table class="table table-responsive table-bordered table-striped term-of-payment">
                <thead>
                <tr>
                    <th><?php echo app('translator')->get('quickadmin.terms_of_payment.fields.header'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.terms_of_payment.fields.content_option_one'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.terms_of_payment.fields.content_option_two'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.terms_of_payment.fields.content_option_three'); ?></th>
                    <th class="action"><?php echo app('translator')->get('quickadmin.terms_of_payment.fields.color_of_elements'); ?></th>
                    <th class="action"><?php echo app('translator')->get('quickadmin.terms_of_payment.fields.appeal'); ?></th>
                    <th class="action">Дія</th>
                </tr>
                </thead>
                <tbody id="terms_of_payment-zhk">

                <?php $__empty_1 = true; $__currentLoopData = old('terms_of_payments', []); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <?php echo $__env->make('admin.residential_complexes.terms_of_payment_row', [
                        'index' => $index,

                    ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <?php $__currentLoopData = $residential_complex->term_of_paymentes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php echo $__env->make('admin.residential_complexes.terms_of_payment_row', [
                            'index' => 'id-' . $item->id,
                            'field' => $item,

                        ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
                </tbody>
            </table>
            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('residential_complex_create')): ?>
                <a href="#" class="btn btn-success pull-right add-new"><?php echo app('translator')->get('quickadmin.qa_add_new'); ?></a>
            <?php endif; ?>
        </div>
    </div>


    <?php echo Form::submit(trans('quickadmin.qa_update'), ['class' => 'btn btn-danger']); ?>

    <?php echo Form::close(); ?>


    <?php echo $__env->make('partials.cropper.cropper-collection', [
                        'aspectRatio' => '16 / 9',
         ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('javascript'); ?>
    ##parent-placeholder-b6e13ad53d8ec41b034c49f131c64e99cf25207a##
    
    <script src="<?php echo e(url('js/tinymce/tinymce.min.js')); ?>"></script>
    <script>
        tinymce.init({
            selector: '#seo_text',
            // plugins: 'print preview paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons',
            plugins: 'lists',
            imagetools_cors_hosts: ['picsum.photos'],
            menubar: 'file edit view insert format tools table help',
            toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent |  numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen  preview save print | insertfile image media template link anchor codesample | ltr rtl',
            toolbar_sticky: true,
        });
    </script>

    <script src="<?php echo e(url('adminlte/js/mapInput.js')); ?>"></script>
    <script src="https://maps.googleapis.com/maps/api/js?key=<?php echo e(env('GOOGLE_MAPS_API_KEY')); ?>&libraries=places&callback=initialize"
            async defer></script>


    <script type="text/html" id="kharakteristiki-template">
        <?php echo $__env->make('admin.residential_complexes.residential_complex_characters_row',
                [
                    'index' => '_INDEX_',
                ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </script>

    <script type="text/html" id="tsinoutvorennya-zhk-template">
        <?php echo $__env->make('admin.residential_complexes.prices_row',
                [
                    'index' => '_INDEX_',
                ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </script>

    <script type="text/html" id="planning-prices-zhk-template">
        <?php echo $__env->make('admin.residential_complexes.planning_prices_row',
                [
                    'index' => '_INDEX_',
                ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </script>

    <script type="text/html" id="terms_of_payment-zhk-template">
        <?php echo $__env->make('admin.residential_complexes.terms_of_payment_row',
                [
                    'index' => '_INDEX_',
                ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </script>

    <script src="<?php echo e(url('adminlte/plugins/datetimepicker/moment-with-locales.min.js')); ?>"></script>
    <script src="<?php echo e(url('adminlte/plugins/datetimepicker/bootstrap-datetimepicker.min.js')); ?>"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/js/bootstrap-datepicker.js"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.css"
          rel="stylesheet"/>
    <script>
        $(function () {
            moment.updateLocale('<?php echo e(App::getLocale()); ?>', {
                week: {dow: 1} // Monday is the first day of the week
            });

            $('.date-time').datetimepicker({
                format: "<?php echo e(config('app.date_format_moment')); ?>",
                locale: "<?php echo e(App::getLocale()); ?>",
            });

            $(".date").datepicker({
                format: "yyyy",
                viewMode: "years",
                minViewMode: "years"
            });
        });
    </script>

    <script>
        $('.add-new').click(function () {
            var tableBody = $(this).parent().find('tbody');
            var template = $('#' + tableBody.attr('id') + '-template').html();
            var lastIndex = parseInt(tableBody.find('tr').last().data('index'));
            if (isNaN(lastIndex)) {
                lastIndex = 0;
            }
            tableBody.append(template.replace(/_INDEX_/g, lastIndex + 1));
            return false;
        });

        $(document).on('click', '.remove', function () {
            var row = $(this).parentsUntil('tr').parent();
            row.remove();
            return false;
        });

        $(function () {
            $("#selectall-icon").select2({
                maximumSelectionLength: 5,
            });
        });
    </script>
    <script src="<?php echo e(asset('quickadmin/plugins/fileUpload/js/jquery.iframe-transport.js')); ?>"></script>
    <script src="<?php echo e(asset('quickadmin/plugins/fileUpload/js/jquery.fileupload.js')); ?>"></script>

    <script>
        $(function () {
            $('.file-upload-landscape').each(function () {
                var $this = $(this);
                var $parent = $(this).parent();

                $(this).fileupload({
                    dataType: 'json',
                    formData: {
                        model_name: 'ResidentialComplex',
                        bucket: $this.data('bucket'),
                        file_key: $this.data('filekey'),
                        _token: '<?php echo e(csrf_token()); ?>'
                    },
                    add: function (e, data) {
                        data.submit();
                    },
                    done: function (e, data) {
                        $.each(data.result.files, function (index, file) {
                            var $line = $($('<p/>', {class: "form-group"}).html(file.name + ' (' + file.size + ' bytes)').appendTo($parent.find('.files-list')));
                            $line.append('<a href="#" class="btn btn-xs btn-danger remove-file">Видалити</a>');
                            $line.append('<input type="hidden" name="' + $this.data('bucket') + '_id[]" value="' + file.id + '"/>');
                            if ($parent.find('.' + $this.data('bucket') + '-ids').val() != '') {
                                $parent.find('.' + $this.data('bucket') + '-ids').val($parent.find('.' + $this.data('bucket') + '-ids').val() + ',');
                            }
                            $parent.find('.' + $this.data('bucket') + '-ids').val($parent.find('.' + $this.data('bucket') + '-ids').val() + file.id);
                        });
                        $parent.find('.progress-bar').hide().css(
                            'width',
                            '0%'
                        );
                    }
                }).on('fileuploadprogressall', function (e, data) {
                    // var progress = parseInt(data.loaded / data.total * 100, 10);
                    // $parent.find('.progress-bar').show().css(
                    //     'width',
                    //     progress + '%'
                    // );
                });
            });
            $(document).on('click', '.remove-file', function () {
                var $parent = $(this).parent();
                $parent.remove();
                return false;
            });
        });
    </script>

    <script>
        $("#selectbtn-count_of_room_per_flat").click(function () {
            $("#selectall-count_of_room_per_flat > option").prop("selected", "selected");
            $("#selectall-count_of_room_per_flat").trigger("change");
        });
        $("#deselectbtn-count_of_room_per_flat").click(function () {
            $("#selectall-count_of_room_per_flat > option").prop("selected", "");
            $("#selectall-count_of_room_per_flat").trigger("change");
        });
    </script>

    <script>
        $("#selectbtn-room_type").click(function () {
            $("#selectall-room_type > option").prop("selected", "selected");
            $("#selectall-room_type").trigger("change");
        });
        $("#deselectbtn-room_type").click(function () {
            $("#selectall-room_type > option").prop("selected", "");
            $("#selectall-room_type").trigger("change");
        });
    </script>

    <script>
        $("#selectbtn-class").click(function () {
            $("#selectall-class > option").prop("selected", "selected");
            $("#selectall-class").trigger("change");
        });
        $("#deselectbtn-class").click(function () {
            $("#selectall-class > option").prop("selected", "");
            $("#selectall-class").trigger("change");
        });
    </script>

    <script>
        $("#selectbtn-stage_of_construction").click(function () {
            $("#selectall-stage_of_construction > option").prop("selected", "selected");
            $("#selectall-stage_of_construction").trigger("change");
        });
        $("#deselectbtn-stage_of_construction").click(function () {
            $("#selectall-stage_of_construction > option").prop("selected", "");
            $("#selectall-stage_of_construction").trigger("change");
        });
    </script>

    <script>
        $("#selectbtn-heating").click(function () {
            $("#selectall-heating > option").prop("selected", "selected");
            $("#selectall-heating").trigger("change");
        });
        $("#deselectbtn-heating").click(function () {
            $("#selectall-heating > option").prop("selected", "");
            $("#selectall-heating").trigger("change");
        });
    </script>

    <script>
        $("#selectbtn-technology_building").click(function () {
            $("#selectall-technology_building > option").prop("selected", "selected");
            $("#selectall-technology_building").trigger("change");
        });
        $("#deselectbtn-technology_building").click(function () {
            $("#selectall-technology_building > option").prop("selected", "");
            $("#selectall-technology_building").trigger("change");
        });
    </script>

    <script>
        $("#selectbtn-other_option").click(function () {
            $("#selectall-other_option > option").prop("selected", "selected");
            $("#selectall-other_option").trigger("change");
        });
        $("#deselectbtn-other_option").click(function () {
            $("#selectall-other_option > option").prop("selected", "");
            $("#selectall-other_option").trigger("change");
        });
    </script>

    <script>
        // $("#selectbtn-icon").click(function () {
        //     $("#selectall-icon > option").prop("selected", "selected");
        //     $("#selectall-icon").trigger("change");
        // });
        $("#deselectbtn-icon").click(function () {
            $("#selectall-icon > option").prop("selected", "");
            $("#selectall-icon").trigger("change");
        });

    </script>

    <script>
        $("#selectbtn-recomended_residental_complex_id").click(function () {
            $("#selectall-recomended_residental_complex_id > option").prop("selected", "selected");
            $("#selectall-recomended_residental_complex_id").trigger("change");
        });
        $("#deselectbtn-recomended_residental_complex_id").click(function () {
            $("#selectall-recomended_residental_complex_id > option").prop("selected", "");
            $("#selectall-recomended_residental_complex_id").trigger("change");
        });
    </script>

    <script>
        $("#selectbtn-bank").click(function () {
            $("#selectall-bank > option").prop("selected", "selected");
            $("#selectall-bank").trigger("change");
        });
        $("#deselectbtn-bank").click(function () {
            $("#selectall-bank > option").prop("selected", "");
            $("#selectall-bank").trigger("change");
        });
    </script>
    <script>
        $('#city_id').on('change', function() {
            let cityId = $('#city_id').val();

            if (cityId) {
                $.ajax({
                    'type': 'get',
                    'url': '<?php echo e(route('api.crud.districts.city')); ?>',
                    'data': {
                        'city_id': cityId
                    },
                    'success': function (data) {
                        let districtOptions = `<option value selected>Будь ласка, виберіть</option>`;

                        data.forEach(item => {
                            districtOptions += `<option value = ${item.id}>${item.name}</option>`;
                        });

                        $('#district_id').find('option').remove().end();
                        $('#district_id').append(districtOptions);
                    }
                });
            } else {
                let districtOptions = `<option value selected>Будь ласка, виберіть</option>`;
                $('#district_id').find('option').remove().end();
                $('#district_id').append(districtOptions);
            }

        });
    </script>
    <script src="<?php echo e(asset('adminlte/js/image/validation/image-validate.js')); ?>"></script>
    <?php echo $__env->make('partials.cropper.cropper-collection-js', [
        'aspectRatio' => '16 / 9',
        'model' => 'ResidentialComplex'
     ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <script src="<?php echo e(asset('adminlte/js/image/upload-presentation.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/vdoma/resources/views/admin/residential_complexes/edit.blade.php ENDPATH**/ ?>