
<?php $__env->startSection('title'); ?>
    <title><?php echo e($seo_text->title); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('meta'); ?>
    <meta name="description" content="<?php echo e($seo_text->meta_description); ?>">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('user-content'); ?>

  <!--===BREADCRUMB PART START====-->
  <section class="wsus__breadcrumb" style="background: url(<?php echo e(url($banner_image->image)); ?>);">
    <div class="wsus_bread_overlay">
        <div class="container">
            <div class="row">
                <div class="col-12 text-center">
                    <h4><?php echo e($menus->where('id',2)->first()->navbar); ?></h4>
                    <nav style="--bs-breadcrumb-divider: '-';" aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>"><?php echo e($menus->where('id',1)->first()->navbar); ?></a></li>
                            <li class="breadcrumb-item active" aria-current="page"><?php echo e($menus->where('id',2)->first()->navbar); ?></li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>
    </div>
</section>
<!--===BREADCRUMB PART END====-->


<?php
    $search_url = request()->fullUrl();
    $get_url = substr($search_url, strpos($search_url, "?") + 1);

    $grid_url='';
    $list_url='';
    $isSortingId=0;

    $page_type=request()->get('page_type') ;
    if($page_type=='list_view'){
        $grid_url=str_replace('page_type=list_view','page_type=grid_view',$search_url);
        $list_url=str_replace('page_type=list_view','page_type=list_view',$search_url);
    }else if($page_type=='grid_view'){
        $grid_url=str_replace('page_type=grid_view','page_type=grid_view',$search_url);
        $list_url=str_replace('page_type=grid_view','page_type=list_view',$search_url);
    }
    if(request()->has('sorting_id')){
        $isSortingId=1;
    }
?>

<!--=====PROPERTY PAGE START=====-->
<section class="wsus__property_page mt_45 mb_45">
  <div class="container">
    <div class="row">
      <div class="col-xl-8">
        <div class="row">
          <div class="col-12">
            <div class="wsus__property_topbar d-flex justify-content-between mb-4">
              <ul class="nav nav-pills" id="pills-tab" role="tablist">
                <li class="nav-item" role="presentation">
                  <button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">
                    <i class="fas fa-th-large"></i>
                  </button>
                </li>
                <li class="nav-item" role="presentation">
                  <button class="nav-link" id="pills-profile-tab" data-bs-toggle="pill" data-bs-target="#pills-profile" type="button" role="tab" aria-controls="pills-profile" aria-selected="false">
                    <i class="far fa-stream"></i>
                  </button>
                </li>
              </ul>
              <div class="wsus__property_top_select">
                <?php if($isSortingId==1): ?>
                <select class="select_2"  id="sortingId">
                    <option <?php echo e(request()->get('sorting_id')==1 ? 'selected' : ''); ?> value="1"><?php echo e($websiteLang->where('lang_key','default_order')->first()->custom_text); ?></option>
                    <option <?php echo e(request()->get('sorting_id')==2 ? 'selected' : ''); ?> value="2"><?php echo e($websiteLang->where('lang_key','most_views')->first()->custom_text); ?></option>
                    <option <?php echo e(request()->get('sorting_id')==3 ? 'selected' : ''); ?> value="3"><?php echo e($websiteLang->where('lang_key','featured')->first()->custom_text); ?></option>
                    <option <?php echo e(request()->get('sorting_id')==4 ? 'selected' : ''); ?> value="4"><?php echo e($websiteLang->where('lang_key','top')->first()->custom_text); ?></option>
                    <option <?php echo e(request()->get('sorting_id')==5 ? 'selected' : ''); ?> value="5"><?php echo e($websiteLang->where('lang_key','new')->first()->custom_text); ?></option>
                    <option <?php echo e(request()->get('sorting_id')==6 ? 'selected' : ''); ?> value="6"><?php echo e($websiteLang->where('lang_key','urgent')->first()->custom_text); ?></option>
                    <option <?php echo e(request()->get('sorting_id')==7 ? 'selected' : ''); ?> value="7"><?php echo e($websiteLang->where('lang_key','oldest')->first()->custom_text); ?></option>
                </select>
                <?php else: ?>
                <select class="select_2" id="sortingId">
                    <option value="1"><?php echo e($websiteLang->where('lang_key','default_order')->first()->custom_text); ?></option>
                    <option value="2"><?php echo e($websiteLang->where('lang_key','most_views')->first()->custom_text); ?></option>
                    <option value="3"><?php echo e($websiteLang->where('lang_key','featured')->first()->custom_text); ?></option>
                    <option value="4"><?php echo e($websiteLang->where('lang_key','top')->first()->custom_text); ?></option>
                    <option value="5"><?php echo e($websiteLang->where('lang_key','new')->first()->custom_text); ?></option>
                    <option value="6"><?php echo e($websiteLang->where('lang_key','urgent')->first()->custom_text); ?></option>
                    <option value="7"><?php echo e($websiteLang->where('lang_key','oldest')->first()->custom_text); ?></option>
                </select>
                <?php endif; ?>
              </div>
            </div>
          </div>

          <?php
                $isActivePropertyQty=0;
                foreach ($properties as $value) {
                    if($value->expired_date==null){
                        $isActivePropertyQty +=1;
                    }else if($value->expired_date >= date('Y-m-d')){
                        $isActivePropertyQty +=1;
                    }
                }
            ?>

          <div class="col-12">
            <div class="tab-content" id="pills-tabContent">
              <div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
                <div class="row">

                    <?php if($isActivePropertyQty > 0): ?>
                        <?php $__currentLoopData = $properties; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php if($item->expired_date==null): ?>
                                <div class="col-xl-6 col-md-6">
                                    <div class="wsus__single_property">
                                    <div class="wsus__single_property_img">
                                        <img src="<?php echo e(asset($item->thumbnail_image)); ?>" alt="properties" class="img-fluid w-100">

                                        <?php if($item->property_purpose_id==1): ?>
                                        <span class="sale"><?php echo e($item->propertyPurpose->custom_purpose); ?></span>

                                        <?php elseif($item->property_purpose_id==2): ?>
                                        <span class="sale"><?php echo e($item->propertyPurpose->custom_purpose); ?></span>
                                        <?php endif; ?>

                                        <?php if($item->urgent_property==1): ?>
                                            <span class="rent"><?php echo e($websiteLang->where('lang_key','urgent')->first()->custom_text); ?></span>
                                        <?php endif; ?>

                                    </div>
                                    <div class="wsus__single_property_text">
                                        <?php if($item->property_purpose_id==1): ?>
                                            <span class="tk"><?php echo e($currency->currency_icon); ?><?php echo e($item->price); ?></span>
                                        <?php elseif($item->property_purpose_id==2): ?>
                                        <span class="tk"><?php echo e($currency->currency_icon); ?><?php echo e($item->price); ?> /
                                            <?php if($item->period=='Daily'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','daily')->first()->custom_text); ?></span>
                                            <?php elseif($item->period=='Monthly'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','monthly')->first()->custom_text); ?></span>
                                            <?php elseif($item->period=='Yearly'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','yearly')->first()->custom_text); ?></span>
                                            <?php endif; ?>
                                        </span>
                                        <?php endif; ?>

                                        <a href="<?php echo e(route('property.details',$item->slug)); ?>" class="title w-100"><?php echo e($item->title); ?></a>
                                        <ul class="d-flex flex-wrap justify-content-between">
                                            <li><i class="fal fa-bed"></i> <?php echo e($item->number_of_bedroom); ?> <?php echo e($websiteLang->where('lang_key','bed')->first()->custom_text); ?></li>
                                            <li><i class="fal fa-shower"></i> <?php echo e($item->number_of_bathroom); ?> <?php echo e($websiteLang->where('lang_key','bath')->first()->custom_text); ?></li>
                                            <li><i class="fal fa-draw-square"></i> <?php echo e($item->area); ?> <?php echo e($websiteLang->where('lang_key','sqft_s')->first()->custom_text); ?></li>
                                        </ul>
                                        <div class="wsus__single_property_footer d-flex justify-content-between align-items-center">
                                            <a href="<?php echo e(route('search-property',['page_type' => 'list_view','property_type' => $item->propertyType->id])); ?>" class="category"><?php echo e($item->propertyType->type); ?></a>

                                        <?php
                                            $total_review=$item->reviews->where('status',1)->count();
                                            if($total_review > 0){
                                                $avg_sum=$item->reviews->where('status',1)->sum('avarage_rating');

                                                $avg=$avg_sum/$total_review;
                                                $intAvg=intval($avg);
                                                $nextVal=$intAvg+1;
                                                $reviewPoint=$intAvg;
                                                $halfReview=false;
                                                if($intAvg < $avg && $avg < $nextVal){
                                                    $reviewPoint= $intAvg + 0.5;
                                                    $halfReview=true;
                                                }
                                            }
                                        ?>

                                        <?php if($total_review > 0): ?>
                                            <span class="rating"><?php echo e(sprintf("%.1f", $reviewPoint)); ?>


                                            <?php for($i = 1; $i <=5; $i++): ?>
                                                <?php if($i <= $reviewPoint): ?>
                                                    <i class="fas fa-star"></i>
                                                <?php elseif($i> $reviewPoint ): ?>
                                                    <?php if($halfReview==true): ?>
                                                    <i class="fas fa-star-half-alt"></i>
                                                        <?php
                                                            $halfReview=false
                                                        ?>
                                                    <?php else: ?>
                                                    <i class="fal fa-star"></i>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            <?php endfor; ?>
                                            </span>
                                        <?php else: ?>
                                            <span class="rating">0.0
                                                <?php for($i = 1; $i <=5; $i++): ?>
                                                <i class="fal fa-star"></i>
                                                <?php endfor; ?>
                                            </span>
                                        <?php endif; ?>
                                        </div>
                                    </div>
                                    </div>
                                </div>
                            <?php elseif($item->expired_date >= date('Y-m-d')): ?>
                                <div class="col-xl-6 col-md-6">
                                    <div class="wsus__single_property">
                                    <div class="wsus__single_property_img">
                                        <img src="<?php echo e(asset($item->thumbnail_image)); ?>" alt="properties" class="img-fluid w-100">

                                        <?php if($item->property_purpose_id==1): ?>
                                        <span class="sale"><?php echo e($item->propertyPurpose->custom_purpose); ?></span>

                                        <?php elseif($item->property_purpose_id==2): ?>
                                        <span class="sale"><?php echo e($item->propertyPurpose->custom_purpose); ?></span>
                                        <?php endif; ?>

                                        <?php if($item->urgent_property==1): ?>
                                            <span class="rent"><?php echo e($websiteLang->where('lang_key','urgent')->first()->custom_text); ?></span>
                                        <?php endif; ?>

                                    </div>
                                    <div class="wsus__single_property_text">
                                        <?php if($item->property_purpose_id==1): ?>
                                            <span class="tk"><?php echo e($currency->currency_icon); ?><?php echo e($item->price); ?></span>
                                        <?php elseif($item->property_purpose_id==2): ?>
                                        <span class="tk"><?php echo e($currency->currency_icon); ?><?php echo e($item->price); ?> /
                                            <?php if($item->period=='Daily'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','daily')->first()->custom_text); ?></span>
                                            <?php elseif($item->period=='Monthly'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','monthly')->first()->custom_text); ?></span>
                                            <?php elseif($item->period=='Yearly'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','yearly')->first()->custom_text); ?></span>
                                            <?php endif; ?>
                                        </span>
                                        <?php endif; ?>

                                        <a href="<?php echo e(route('property.details',$item->slug)); ?>" class="title w-100"><?php echo e($item->title); ?></a>
                                        <ul class="d-flex flex-wrap justify-content-between">
                                            <li><i class="fal fa-bed"></i> <?php echo e($item->number_of_bedroom); ?> <?php echo e($websiteLang->where('lang_key','bed')->first()->custom_text); ?></li>
                                            <li><i class="fal fa-shower"></i> <?php echo e($item->number_of_bathroom); ?> <?php echo e($websiteLang->where('lang_key','bath')->first()->custom_text); ?></li>
                                            <li><i class="fal fa-draw-square"></i> <?php echo e($item->area); ?> <?php echo e($websiteLang->where('lang_key','sqft_s')->first()->custom_text); ?></li>
                                        </ul>
                                        <div class="wsus__single_property_footer d-flex justify-content-between align-items-center">
                                            <a href="<?php echo e(route('search-property',['page_type' => 'list_view','property_type' => $item->propertyType->id])); ?>" class="category"><?php echo e($item->propertyType->type); ?></a>

                                        <?php
                                            $total_review=$item->reviews->where('status',1)->count();
                                            if($total_review > 0){
                                                $avg_sum=$item->reviews->where('status',1)->sum('avarage_rating');

                                                $avg=$avg_sum/$total_review;
                                                $intAvg=intval($avg);
                                                $nextVal=$intAvg+1;
                                                $reviewPoint=$intAvg;
                                                $halfReview=false;
                                                if($intAvg < $avg && $avg < $nextVal){
                                                    $reviewPoint= $intAvg + 0.5;
                                                    $halfReview=true;
                                                }
                                            }
                                        ?>

                                        <?php if($total_review > 0): ?>
                                            <span class="rating"><?php echo e(sprintf("%.1f", $reviewPoint)); ?>


                                            <?php for($i = 1; $i <=5; $i++): ?>
                                                <?php if($i <= $reviewPoint): ?>
                                                    <i class="fas fa-star"></i>
                                                <?php elseif($i> $reviewPoint ): ?>
                                                    <?php if($halfReview==true): ?>
                                                    <i class="fas fa-star-half-alt"></i>
                                                        <?php
                                                            $halfReview=false
                                                        ?>
                                                    <?php else: ?>
                                                    <i class="fal fa-star"></i>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            <?php endfor; ?>
                                            </span>
                                        <?php else: ?>
                                            <span class="rating">0.0
                                                <?php for($i = 1; $i <=5; $i++): ?>
                                                <i class="fal fa-star"></i>
                                                <?php endfor; ?>
                                            </span>
                                        <?php endif; ?>
                                        </div>
                                    </div>
                                    </div>
                                </div>
                            <?php endif; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php else: ?>
                    <div class="col-12 text-center">
                        <h3 class="text-danger"><?php echo e($websiteLang->where('lang_key','property_not_found')->first()->custom_text); ?></h3>
                    </div>
                    <?php endif; ?>

                </div>
              </div>
              <div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">
                <div class="row list_view">
                    <?php if($isActivePropertyQty > 0): ?>
                        <?php $__currentLoopData = $properties; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php if($item->expired_date==null): ?>
                                <div class="col-12">
                                    <div class="wsus__single_property">
                                    <div class="wsus__single_property_img">
                                        <img src="<?php echo e(asset($item->thumbnail_image)); ?>" alt="properties" class="img-fluid w-100">
                                    </div>
                                    <div class="wsus__single_property_text">

                                        <?php if($item->property_purpose_id==1): ?>
                                        <span class="sale"><?php echo e($item->propertyPurpose->custom_purpose); ?></span>

                                        <?php elseif($item->property_purpose_id==2): ?>
                                        <span class="sale"><?php echo e($item->propertyPurpose->custom_purpose); ?></span>
                                        <?php endif; ?>

                                        <?php if($item->urgent_property==1): ?>
                                            <span class="rent"><?php echo e($websiteLang->where('lang_key','urgent')->first()->custom_text); ?></span>
                                        <?php endif; ?>

                                        <?php if($item->property_purpose_id==1): ?>
                                            <span class="tk"><?php echo e($currency->currency_icon); ?><?php echo e($item->price); ?></span>
                                        <?php elseif($item->property_purpose_id==2): ?>
                                        <span class="tk"><?php echo e($currency->currency_icon); ?><?php echo e($item->price); ?> /
                                            <?php if($item->period=='Daily'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','daily')->first()->custom_text); ?></span>
                                            <?php elseif($item->period=='Monthly'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','monthly')->first()->custom_text); ?></span>
                                            <?php elseif($item->period=='Yearly'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','yearly')->first()->custom_text); ?></span>
                                            <?php endif; ?>
                                        </span>
                                        <?php endif; ?>

                                        <a href="<?php echo e(route('property.details',$item->slug)); ?>" class="title w-100"><?php echo e($item->title); ?></a>
                                        <ul class="d-flex flex-wrap justify-content-between">
                                            <li><i class="fal fa-bed"></i> <?php echo e($item->number_of_bedroom); ?> <?php echo e($websiteLang->where('lang_key','bed')->first()->custom_text); ?></li>
                                            <li><i class="fal fa-shower"></i> <?php echo e($item->number_of_bathroom); ?> <?php echo e($websiteLang->where('lang_key','bath')->first()->custom_text); ?></li>
                                            <li><i class="fal fa-draw-square"></i> <?php echo e($item->area); ?> <?php echo e($websiteLang->where('lang_key','sqft_s')->first()->custom_text); ?></li>
                                        </ul>
                                        <div class="wsus__single_property_footer d-flex justify-content-between align-items-center">
                                            <a href="<?php echo e(route('search-property',['page_type' => 'list_view','property_type' => $item->propertyType->id])); ?>" class="category"><?php echo e($item->propertyType->type); ?></a>

                                            <?php
                                                $total_review=$item->reviews->where('status',1)->count();
                                                if($total_review > 0){
                                                    $avg_sum=$item->reviews->where('status',1)->sum('avarage_rating');

                                                    $avg=$avg_sum/$total_review;
                                                    $intAvg=intval($avg);
                                                    $nextVal=$intAvg+1;
                                                    $reviewPoint=$intAvg;
                                                    $halfReview=false;
                                                    if($intAvg < $avg && $avg < $nextVal){
                                                        $reviewPoint= $intAvg + 0.5;
                                                        $halfReview=true;
                                                    }
                                                }
                                            ?>

                                            <?php if($total_review > 0): ?>
                                            <span class="rating"><?php echo e(sprintf("%.1f", $reviewPoint)); ?>


                                            <?php for($i = 1; $i <=5; $i++): ?>
                                                <?php if($i <= $reviewPoint): ?>
                                                    <i class="fas fa-star"></i>
                                                <?php elseif($i> $reviewPoint ): ?>
                                                    <?php if($halfReview==true): ?>
                                                    <i class="fas fa-star-half-alt"></i>
                                                        <?php
                                                            $halfReview=false
                                                        ?>
                                                    <?php else: ?>
                                                    <i class="fal fa-star"></i>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            <?php endfor; ?>
                                            </span>
                                            <?php else: ?>
                                            <span class="rating">0.0
                                                <?php for($i = 1; $i <=5; $i++): ?>
                                                <i class="fal fa-star"></i>
                                                <?php endfor; ?>
                                            </span>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    </div>
                                </div>
                            <?php elseif($item->expired_date >= date('Y-m-d')): ?>
                                <div class="col-12">
                                    <div class="wsus__single_property">
                                    <div class="wsus__single_property_img">
                                        <img src="<?php echo e(asset($item->thumbnail_image)); ?>" alt="properties" class="img-fluid w-100">
                                    </div>
                                    <div class="wsus__single_property_text">

                                        <?php if($item->property_purpose_id==1): ?>
                                        <span class="sale"><?php echo e($item->propertyPurpose->custom_purpose); ?></span>

                                        <?php elseif($item->property_purpose_id==2): ?>
                                        <span class="sale"><?php echo e($item->propertyPurpose->custom_purpose); ?></span>
                                        <?php endif; ?>

                                        <?php if($item->urgent_property==1): ?>
                                            <span class="rent"><?php echo e($websiteLang->where('lang_key','urgent')->first()->custom_text); ?></span>
                                        <?php endif; ?>

                                        <?php if($item->property_purpose_id==1): ?>
                                            <span class="tk"><?php echo e($currency->currency_icon); ?><?php echo e($item->price); ?></span>
                                        <?php elseif($item->property_purpose_id==2): ?>
                                        <span class="tk"><?php echo e($currency->currency_icon); ?><?php echo e($item->price); ?> /
                                            <?php if($item->period=='Daily'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','daily')->first()->custom_text); ?></span>
                                            <?php elseif($item->period=='Monthly'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','monthly')->first()->custom_text); ?></span>
                                            <?php elseif($item->period=='Yearly'): ?>
                                            <span><?php echo e($websiteLang->where('lang_key','yearly')->first()->custom_text); ?></span>
                                            <?php endif; ?>
                                        </span>
                                        <?php endif; ?>

                                        <a href="<?php echo e(route('property.details',$item->slug)); ?>" class="title w-100"><?php echo e($item->title); ?></a>
                                        <ul class="d-flex flex-wrap justify-content-between">
                                            <li><i class="fal fa-bed"></i> <?php echo e($item->number_of_bedroom); ?> <?php echo e($websiteLang->where('lang_key','bed')->first()->custom_text); ?></li>
                                            <li><i class="fal fa-shower"></i> <?php echo e($item->number_of_bathroom); ?> <?php echo e($websiteLang->where('lang_key','bath')->first()->custom_text); ?></li>
                                            <li><i class="fal fa-draw-square"></i> <?php echo e($item->area); ?> <?php echo e($websiteLang->where('lang_key','sqft_s')->first()->custom_text); ?></li>
                                        </ul>
                                        <div class="wsus__single_property_footer d-flex justify-content-between align-items-center">
                                            <a href="<?php echo e(route('search-property',['page_type' => 'list_view','property_type' => $item->propertyType->id])); ?>" class="category"><?php echo e($item->propertyType->type); ?></a>

                                            <?php
                                                $total_review=$item->reviews->where('status',1)->count();
                                                if($total_review > 0){
                                                    $avg_sum=$item->reviews->where('status',1)->sum('avarage_rating');

                                                    $avg=$avg_sum/$total_review;
                                                    $intAvg=intval($avg);
                                                    $nextVal=$intAvg+1;
                                                    $reviewPoint=$intAvg;
                                                    $halfReview=false;
                                                    if($intAvg < $avg && $avg < $nextVal){
                                                        $reviewPoint= $intAvg + 0.5;
                                                        $halfReview=true;
                                                    }
                                                }
                                            ?>

                                            <?php if($total_review > 0): ?>
                                            <span class="rating"><?php echo e(sprintf("%.1f", $reviewPoint)); ?>


                                            <?php for($i = 1; $i <=5; $i++): ?>
                                                <?php if($i <= $reviewPoint): ?>
                                                    <i class="fas fa-star"></i>
                                                <?php elseif($i> $reviewPoint ): ?>
                                                    <?php if($halfReview==true): ?>
                                                    <i class="fas fa-star-half-alt"></i>
                                                        <?php
                                                            $halfReview=false
                                                        ?>
                                                    <?php else: ?>
                                                    <i class="fal fa-star"></i>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            <?php endfor; ?>
                                            </span>
                                            <?php else: ?>
                                            <span class="rating">0.0
                                                <?php for($i = 1; $i <=5; $i++): ?>
                                                <i class="fal fa-star"></i>
                                                <?php endfor; ?>
                                            </span>
                                            <?php endif; ?>
                                        </div>
                                    </div>
                                    </div>
                                </div>
                            <?php endif; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php else: ?>
                        <div class="col-12 text-center">
                            <h3 class="text-danger"><?php echo e($websiteLang->where('lang_key','property_not_found')->first()->custom_text); ?></h3>
                        </div>
                    <?php endif; ?>


                </div>
              </div>
            </div>
          </div>
          <?php if($isActivePropertyQty > 0): ?>
          <div class="col-12">
            <?php echo e($properties->links('user.paginator')); ?>

          </div>
          <?php endif; ?>
        </div>
      </div>
      <div class="col-xl-4">
        <div class="wsus__search_property" id="sticky_sidebar">
          <h3><?php echo e($websiteLang->where('lang_key','find_property')->first()->custom_text); ?> </h3>
          <form method="GET" action="<?php echo e(route('search-property')); ?>">
            <div class="wsus__single_property_search">
              <label><?php echo e($websiteLang->where('lang_key','keyword')->first()->custom_text); ?></label>
              <input type="text" placeholder="<?php echo e($websiteLang->where('lang_key','search_type')->first()->custom_text); ?>" name="search">
            </div>
            <input type="hidden" name="page_type" value="<?php echo e($page_type); ?>">
            <div class="wsus__single_property_search">
              <label><?php echo e($websiteLang->where('lang_key','location')->first()->custom_text); ?></label>
              <select class="select_2" name="city_id">
                <option value=""><?php echo e($websiteLang->where('lang_key','location')->first()->custom_text); ?></option>
                <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city_item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <option value="<?php echo e($city_item->id); ?>"><?php echo e($city_item->name); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
            </div>
            <div class="wsus__single_property_search">
              <label><?php echo e($websiteLang->where('lang_key','property_type_s')->first()->custom_text); ?></label>
              <select class="select_2" name="property_type">
                <option value=""><?php echo e($websiteLang->where('lang_key','property_type_s')->first()->custom_text); ?></option>
                <?php $__currentLoopData = $propertyTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $property_type_item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($property_type_item->id); ?>"><?php echo e($property_type_item->type); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
            </div>
            <div class="wsus__single_property_search">
              <label><?php echo e($websiteLang->where('lang_key','property_purpose')->first()->custom_text); ?></label>
              <select class="select_2" name="purpose_type">
                <option value=""><?php echo e($websiteLang->where('lang_key','any')->first()->custom_text); ?></option>
                <option value="1"><?php echo e($websiteLang->where('lang_key','sell')->first()->custom_text); ?></option>
                <option value="2"><?php echo e($websiteLang->where('lang_key','rent')->first()->custom_text); ?></option>
            </select>
            </div>
            <div class="wsus__single_property_search_check">
              <div class="accordion" id="accordionExample">
                <div class="accordion-item">
                  <h2 class="accordion-header" id="headingThree">
                    <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                        <?php echo e($websiteLang->where('lang_key','aminities')->first()->custom_text); ?>

                    </button>
                  </h2>
                  <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample">
                    <div class="accordion-body">
                        <?php $__currentLoopData = $aminities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $aminity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="form-check">
                                <input name="aminity[]" class="form-check-input" type="checkbox" value="<?php echo e($aminity->id); ?>" id="flexCheckDefault-<?php echo e($aminity->id); ?>">
                                <label class="form-check-label" for="flexCheckDefault-<?php echo e($aminity->id); ?>">
                                    <?php echo e($aminity->aminity); ?>

                                </label>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <button type="submit" class="common_btn2"><?php echo e($websiteLang->where('lang_key','search')->first()->custom_text); ?></button>
          </form>
        </div>
      </div>
    </div>
  </div>
</section>
<!--=====PROPERTY PAGE END=====-->

<script>
    (function($) {
    "use strict";
    $(document).ready(function () {
        $("#sortingId").on("change",function(){
            var id=$(this).val();

            var isSortingId='<?php echo $isSortingId; ?>'
            var query_url='<?php echo $search_url; ?>';

            if(isSortingId==0){
                var sorting_id="&sorting_id="+id;
                query_url += sorting_id;
            }else{
                    var href = new URL(query_url);
                href.searchParams.set('sorting_id', id);
                query_url=href.toString()
            }

            window.location.href = query_url;
        })

    });

    })(jQuery);
</script>
<?php $__env->stopSection(); ?>

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