
<?php $__env->startSection('title'); ?>
    <title><?php echo e($websiteLang->where('lang_key','my_property')->first()->custom_text); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('user-dashboard'); ?>
<div class="row">
    <form action="<?php echo e(route('user.property.store')); ?>" method="POST" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>
    <div class="col-xl-9 ms-auto">
        <div class="wsus__dashboard_main_content">
          <div class="wsus__add_property">
            <h4 class="heading"><?php echo e($websiteLang->where('lang_key','my_property')->first()->custom_text); ?> <a href="<?php echo e(route('user.my.properties')); ?>" class="common_btn"><i class="fal fa-plus-octagon"></i> <?php echo e($websiteLang->where('lang_key','all_property')->first()->custom_text); ?></a></h4>
            <div class="wsus__dash_info p_25 pb_0">
              <div class="row">
                <h5 class="sub_heading"><?php echo e($websiteLang->where('lang_key','basic_info')->first()->custom_text); ?></h5>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label><?php echo e($websiteLang->where('lang_key','title')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="title" id="title" value="<?php echo e(old('title')); ?>">
                    <input type="hidden" name="expired_date" value="<?php echo e($expired_date); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#" for="slug"><?php echo e($websiteLang->where('lang_key','slug')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="slug" id="slug" value="<?php echo e(old('slug')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','property_type')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <select class="select_2" name="property_type" id="property_type">
                        <option value=""><?php echo e($websiteLang->where('lang_key','select_property_type')->first()->custom_text); ?></option>
                            <?php $__currentLoopData = $propertyTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option <?php echo e(old('property_type')==$item->id ? 'selected' : ''); ?> value="<?php echo e($item->id); ?>"><?php echo e($item->type); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','city')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <select class="select_2" name="city">
                        <option value=""><?php echo e($websiteLang->where('lang_key','select_city')->first()->custom_text); ?></option>
                        <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option <?php echo e(old('city')==$item->id ? 'selected' : ''); ?> value="<?php echo e($item->id); ?>"><?php echo e($item->name.', '.$item->countryState->name.', '.$item->countryState->country->name); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','address')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="address" value="<?php echo e(old('address')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','phone')->first()->custom_text); ?></label>
                    <input type="text" name="phone" value="<?php echo e(old('phone')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','email')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="email" name="email" value="<?php echo e(old('email')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','website')->first()->custom_text); ?></label>
                    <input type="url" name="website" value="<?php echo e(old('website')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','purpose')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <select class="select_2" name="purpose" id="purpose">
                        <?php $__currentLoopData = $purposes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($item->id); ?>"><?php echo e($item->custom_purpose); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                    <div class="wsus__property_input">
                        <label for="#"><?php echo e($websiteLang->where('lang_key','price')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                        <input type="text" name="price" value="<?php echo e(old('price')); ?>">
                    </div>
                  </div>

                <div class="col-xl-6 col-md-6 d-none" id="period_box">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','period')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <select class="select_2" name="period" id="period">
                        <option value="Daily"><?php echo e($websiteLang->where('lang_key','daily')->first()->custom_text); ?></option>
                        <option value="Monthly"><?php echo e($websiteLang->where('lang_key','monthly')->first()->custom_text); ?></option>
                        <option value="Yearly"><?php echo e($websiteLang->where('lang_key','yearly')->first()->custom_text); ?></option>
                    </select>
                  </div>
                </div>

              </div>
            </div>
            <div class="wsus__dash_info p_25 mt_25 pb_0">
              <div class="row">
                <h5 class="sub_heading"><?php echo e($websiteLang->where('lang_key','others_info')->first()->custom_text); ?></h5>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','total_area')->first()->custom_text); ?>(<?php echo e($websiteLang->where('lang_key','sqft')->first()->custom_text); ?>) <span class="text-danger">*</span></label>
                    <input type="text" name="area" value="<?php echo e(old('area')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','total_unit')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="unit" value="<?php echo e(old('unit')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','total_room')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="room" value="<?php echo e(old('room')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','total_bedroom')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="bedroom" value="<?php echo e(old('bedroom')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','total_bathroom')->first()->custom_text); ?><span class="text-danger">*</span></label>
                    <input type="text" name="bathroom" value="<?php echo e(old('bathroom')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','total_floor')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="floor" value="<?php echo e(old('floor')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','total_kitchen')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="kitchen" value="<?php echo e(old('kitchen')); ?>">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','parking_place')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="text" name="parking" value="<?php echo e(old('parking')); ?>">
                  </div>
                </div>
              </div>
            </div>
            <div class="wsus__dash_info p_25 mt_25 pb_0">
              <div class="row">
                <h5 class="sub_heading"><?php echo e($websiteLang->where('lang_key','img_pdf_video')->first()->custom_text); ?></h5>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','pdf_file')->first()->custom_text); ?></label>
                    <input type="file" name="pdf_file">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','banner_img')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="file" name="banner_image">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','thumb_img')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                    <input type="file" name="thumbnail_image">
                  </div>
                </div>
                <div class="col-xl-6 col-md-6">
                  <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','video_link')->first()->custom_text); ?></label>
                    <input type="text" name="video_link">
                  </div>
                </div>
                <div class="col-xl-8 col-md-8 ">
                    <div id="dynamic-img-box">
                        <div class="row">
                            <div class="col-md-9">
                                <div class="wsus__property_input">
                                    <label for="#"><?php echo e($websiteLang->where('lang_key','img')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                                    <input type="file" name="slider_images[]">
                                </div>
                            </div>

                            <div class="col-md-3">
                                <div class="medicine_row_input">
                                    <button class="mt_30" type="button" id="addDynamicImgBtn"><i class="fas fa-plus" aria-hidden="true"></i></button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


                <div id="dynamic_img_box" class="d-none">
                    <div class="row delete-dynamic-img-row">
                        <div class="col-md-9">
                            <div class="wsus__property_input">
                                <label for="#"><?php echo e($websiteLang->where('lang_key','img')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                                <input type="file" name="slider_images[]">
                            </div>
                        </div>

                        <div class="col-md-3">
                            <div class="medicine_row_input">
                                <button class="mt_30 danger_btn removeDynamicImgId" type="button"><i class="fas fa-trash" aria-hidden="true"></i></button>
                            </div>
                        </div>
                    </div>
                </div>

              </div>
            </div>

            <?php if($package->number_of_aminities==-1): ?>
                <div class="wsus__dash_info dash_aminities p_25 mt_25 pb_0">
                    <h5 class="sub_heading"><?php echo e($websiteLang->where('lang_key','aminities')->first()->custom_text); ?></h5>
                    <div class="row">
                        <?php $__currentLoopData = $aminities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $aminity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php if(old('aminities')): ?>
                                <?php
                                    $isChecked=false;
                                ?>
                                <?php $__currentLoopData = old('aminities'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $old_aminity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if($aminity->id==$old_aminity): ?>
                                        <?php
                                            $isChecked=true;
                                        ?>
                                    <?php endif; ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                <div class="col-xl-4 col-sm-6 col-lg-4">
                                    <div class="form-check">
                                    <input class="form-check-input" <?php echo e($isChecked ? 'checked' : ''); ?> type="checkbox" name="aminities[]" id="un-aminityId-<?php echo e($aminity->id); ?>" value="<?php echo e($aminity->id); ?>">
                                    <label class="form-check-label" for="un-aminityId-<?php echo e($aminity->id); ?>">
                                        <?php echo e($aminity->aminity); ?>

                                    </label>
                                    </div>
                                </div>

                            <?php else: ?>
                                <div class="col-xl-4 col-sm-6 col-lg-4">
                                    <div class="form-check">
                                    <input class="form-check-input" type="checkbox" name="aminities[]" id="un-aminityId-<?php echo e($aminity->id); ?>" value="<?php echo e($aminity->id); ?>">
                                    <label class="form-check-label" for="un-aminityId-<?php echo e($aminity->id); ?>">
                                        <?php echo e($aminity->aminity); ?>

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

                <?php
                    $aminityList=[];
                    foreach ($aminities as $index => $aminity) {
                        $aminityList[]=$aminity->id;
                    }
                ?>
            <?php else: ?>
              <div class="wsus__dash_info dash_aminities p_25 mt_25 pb_0">
                <h5 class="sub_heading"><?php echo e($websiteLang->where('lang_key','aminities')->first()->custom_text); ?></h5>
                <div class="row">
                  <?php $__currentLoopData = $aminities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $aminity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <?php if(old('aminities')): ?>
                          <?php
                              $isChecked=false;
                          ?>
                          <?php $__currentLoopData = old('aminities'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $old_aminity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                              <?php if($aminity->id==$old_aminity): ?>
                                  <?php
                                      $isChecked=true;
                                  ?>
                              <?php endif; ?>
                          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                          <div class="col-xl-4 col-sm-6 col-lg-4">
                              <div class="form-check">
                              <input class="form-check-input is-check" <?php echo e($isChecked ? 'checked' : ''); ?> type="checkbox" name="aminities[]" id="aminityId-<?php echo e($aminity->id); ?>" value="<?php echo e($aminity->id); ?>">
                              <label class="form-check-label" for="aminityId-<?php echo e($aminity->id); ?>">
                                  <?php echo e($aminity->aminity); ?>

                              </label>
                              </div>
                          </div>
                      <?php else: ?>
                          <div class="col-xl-4 col-sm-6 col-lg-4">
                              <div class="form-check">
                              <input class="form-check-input is-check" type="checkbox" name="aminities[]" id="aminityId-<?php echo e($aminity->id); ?>" value="<?php echo e($aminity->id); ?>">
                              <label class="form-check-label" for="aminityId-<?php echo e($aminity->id); ?>">
                                  <?php echo e($aminity->aminity); ?>

                              </label>
                              </div>
                          </div>
                      <?php endif; ?>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              </div>
              <?php
                    $aminityList=[];
                    foreach ($aminities as $index => $aminity) {
                        $aminityList[]=$aminity->id;
                    }
                ?>
            <?php endif; ?>
          </div>
          <div class="wsus__dash_info nearest_location p_25 mt_25">
            <h5 class="sub_heading"><?php echo e($websiteLang->where('lang_key','nearest_loc')->first()->custom_text); ?></h5>
            <div id="dyamic-nearest-place-box">
                <div class="row">
                    <div class="col-xl-5 col-md-5">
                        <label><?php echo e($websiteLang->where('lang_key','nearest_loc')->first()->custom_text); ?></label>
                        <select class="custom-select-box" name="nearest_locations[]">
                        <option value=""><?php echo e($websiteLang->where('lang_key','select_nearest_loc')->first()->custom_text); ?></option>
                            <?php $__currentLoopData = $nearest_locatoins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($item->id); ?>"><?php echo e($item->location); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                    </div>
                    <div class="col-xl-5 col-md-5">
                        <label for="#"><?php echo e($websiteLang->where('lang_key','distance')->first()->custom_text); ?>(<?php echo e($websiteLang->where('lang_key','km')->first()->custom_text); ?>)</label>
                        <input type="text" name="distances[]">
                    </div>
                    <div class="col-xl-2 col-md-2">
                        <button class="common_btn mt_30" id="addDybanamicLocationBtn"><?php echo e($websiteLang->where('lang_key','new')->first()->custom_text); ?></button>
                    </div>
                </div>
            </div>
          </div>

            <div id="hidden-location-box" class="d-none">
                <div class="delete-dynamic-location">
                    <div class="row mt-3">
                        <div class="col-xl-5 col-md-5">
                            <label><?php echo e($websiteLang->where('lang_key','nearest_loc')->first()->custom_text); ?></label>
                            <select class="custom-select-box" name="nearest_locations[]">
                            <option value=""><?php echo e($websiteLang->where('lang_key','select_nearest_loc')->first()->custom_text); ?></option>
                                <?php $__currentLoopData = $nearest_locatoins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($item->id); ?>"><?php echo e($item->location); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="col-xl-5 col-md-5">
                            <label for="#"><?php echo e($websiteLang->where('lang_key','distance')->first()->custom_text); ?>(<?php echo e($websiteLang->where('lang_key','km')->first()->custom_text); ?>)</label>
                            <input type="text" name="distances[]">
                        </div>
                        <div class="col-xl-2 col-md-2">
                            <button class="common_btn mt_30 removeNearstPlaceBtnId" id="addDybanamicLocationBtn"><?php echo e($websiteLang->where('lang_key','remove')->first()->custom_text); ?></button>
                        </div>
                    </div>
                </div>
            </div>



          <div class="wsus__dash_info pro_det_map p_25 mt_25 pb_0">
            <h5 class="sub_heading"><?php echo e($websiteLang->where('lang_key','detail_google_map')->first()->custom_text); ?> </h5>
            <div class="wsus__property_input">
              <label><?php echo e($websiteLang->where('lang_key','google_map')->first()->custom_text); ?></label>
              <textarea cols="3" rows="3"  name="google_map_embed_code"><?php echo e(old('google_map_embed_code')); ?></textarea>
            </div>
            <div class="wsus__property_inpuT">
              <label><?php echo e($websiteLang->where('lang_key','des')->first()->custom_text); ?> <span class="text-danger">*</span>
              <textarea class="form-control summer_note" id="summernote" name="description"><?php echo e(old('description')); ?></textarea>
            </div>
          </div>
          <div class="wsus__dash_info featured p_25 mt_25">
            <div class="row">
                <?php if($package->is_featured): ?>
                    <?php if($package->number_of_feature_property==-1): ?>
                    <div class="col-12">
                        <div class="wsus__property_input">
                            <label for="#"><?php echo e($websiteLang->where('lang_key','featured')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                            <select class="select_2" name="featured">
                                <option value="1"><?php echo e($websiteLang->where('lang_key','yes')->first()->custom_text); ?></option>
                                <option value="0"><?php echo e($websiteLang->where('lang_key','no')->first()->custom_text); ?></option>
                            </select>
                        </div>
                      </div>
                    <?php elseif($package->number_of_feature_property > $existFeaturedProperty): ?>
                        <div class="col-12">
                            <div class="wsus__property_input">
                                <label for="#"><?php echo e($websiteLang->where('lang_key','featured')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                                <select class="select_2" name="featured">
                                    <option value="1"><?php echo e($websiteLang->where('lang_key','yes')->first()->custom_text); ?></option>
                                    <option value="0"><?php echo e($websiteLang->where('lang_key','no')->first()->custom_text); ?></option>
                                </select>
                            </div>
                        </div>
                    <?php endif; ?>
                <?php endif; ?>

                <?php if($package->is_top): ?>
                    <?php if($package->number_of_top_property==-1): ?>
                    <div class="col-12">
                        <div class="wsus__property_input">
                        <label for="#"><?php echo e($websiteLang->where('lang_key','top_property')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                        <select class="select_2" name="top_property">
                            <option value="1"><?php echo e($websiteLang->where('lang_key','yes')->first()->custom_text); ?></option>
                            <option value="0"><?php echo e($websiteLang->where('lang_key','no')->first()->custom_text); ?></option>
                        </select>
                        </div>
                    </div>
                    <?php elseif($package->number_of_top_property > $existTopProperty): ?>
                    <div class="col-12">
                        <div class="wsus__property_input">
                        <label for="#"><?php echo e($websiteLang->where('lang_key','top_property')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                        <select class="select_2" name="top_property">
                            <option value="1"><?php echo e($websiteLang->where('lang_key','yes')->first()->custom_text); ?></option>
                            <option value="0"><?php echo e($websiteLang->where('lang_key','no')->first()->custom_text); ?></option>
                        </select>
                        </div>
                    </div>
                    <?php endif; ?>
              <?php endif; ?>

              <?php if($package->is_urgent): ?>
                <?php if($package->number_of_urgent_property==-1): ?>
                    <div class="col-xl-6 col-md-6">
                        <div class="wsus__property_input">
                            <label for="#"><?php echo e($websiteLang->where('lang_key','urgent_property')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                            <select class="select_2" name="urgent_property">
                                <option value="1"><?php echo e($websiteLang->where('lang_key','yes')->first()->custom_text); ?></option>
                                <option value="0"><?php echo e($websiteLang->where('lang_key','no')->first()->custom_text); ?></option>
                            </select>
                        </div>
                    </div>
                <?php elseif($package->number_of_urgent_property > $existUrgentProperty): ?>
                    <div class="col-xl-6 col-md-6">
                        <div class="wsus__property_input">
                            <label for="#"><?php echo e($websiteLang->where('lang_key','urgent_property')->first()->custom_text); ?> <span class="text-danger">*</span></label>
                            <select class="select_2" name="urgent_property">
                                <option value="1"><?php echo e($websiteLang->where('lang_key','yes')->first()->custom_text); ?></option>
                                <option value="0"><?php echo e($websiteLang->where('lang_key','no')->first()->custom_text); ?></option>
                            </select>
                        </div>
                    </div>
                <?php endif; ?>
              <?php endif; ?>


              <div class="col-12">
                <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','seo_title')->first()->custom_text); ?></label>
                    <input type="text" name="seo_title" value="<?php echo e(old('seo_title')); ?>">
                </div>
              </div>
              <div class="col-xl-12">
                <div class="wsus__property_input">
                    <label for="#"><?php echo e($websiteLang->where('lang_key','seo_des')->first()->custom_text); ?></label>
                    <textarea cols="3" rows="3" name="seo_description"><?php echo e(old('seo_description')); ?></textarea>
                </div>
              </div>
              <div class="col-12">
                <button type="submit" class="common_btn"><?php echo e($websiteLang->where('lang_key','save')->first()->custom_text); ?></button>
              </div>
            </div>

          </div>
        </div>
    </div>
</div>
</form>
</div>

<script>
    (function($) {
    "use strict";
    $(document).ready(function () {

        var image=1;
        var maxImage='<?php echo e($package->number_of_photo); ?>';
        var location=1;
        var maxLocation='<?php echo e($package->number_of_nearest_place); ?>';
        $("#addDynamicImgBtn").on('click',function(e) {
            e.preventDefault();

            var dynaicImage = $("#dynamic_img_box").html();
            if(maxImage==-1){
                $("#dynamic-img-box").append(dynaicImage);
            }else if(image < maxImage){
                image++;
                $("#dynamic-img-box").append(dynaicImage);
            }


        })

        $(document).on('click', '.removeDynamicImgId', function () {
            $(this).closest('.delete-dynamic-img-row').remove();
            image--;
        });

        $("#addDybanamicLocationBtn").on('click',function(e) {
            e.preventDefault();
            var newRow=$("#hidden-location-box").html()

            if(maxLocation == -1){
                $("#dyamic-nearest-place-box").append(newRow);
            }else if(location < maxLocation){
                location++;
                $("#dyamic-nearest-place-box").append(newRow);
            }

        })

        $(document).on('click', '.removeNearstPlaceBtnId', function () {
                $(this).closest('.delete-dynamic-location').remove();
                location--;
        });

        $("#title").on("focusout",function(e){
            $("#slug").val(convertToSlug($(this).val()));
        })

        $("#purpose").on("change",function(){
            var purposeId=$(this).val()
            if(purposeId==2){
                $("#period_box").removeClass('d-none');
            }else if(purposeId==1){
                $("#period_box").addClass('d-none');
            }
        })


        //start handle aminity
        $(".is-check").on("click",function(e){
            var ids = [];
            var aminityList=<?= json_encode($aminityList)?>;
            var maxAminity= <?= $package->number_of_aminities ?>;
            $('input[name="aminities[]"]:checked').each(function() {
                ids.push(this.value);
            });
            var idsLenth=ids.length;

            const checkedIds = ids.map((i) => Number(i));

            var unCheckedIds=aminityList.filter(d => !checkedIds.includes(d))


            if( maxAminity > idsLenth){
                for(var j=0; j< unCheckedIds.length ; j++){
                    $("#aminityId-"+unCheckedIds[j]).prop("disabled", false);
                }

            }else{
                for(var j=0; j< unCheckedIds.length ; j++){
                    $("#aminityId-"+unCheckedIds[j]).prop("disabled", true);
                }

            }

        })
        //end handle aminity



    });

    })(jQuery);


    function convertToSlug(Text)
    {
        return Text
            .toLowerCase()
            .replace(/[^\w ]+/g,'')
            .replace(/ +/g,'-');
    }
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.user.profile.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/cloudelite/imobi.eliteteclda.com/resources/views/user/profile/property/create.blade.php ENDPATH**/ ?>