
<?php $__env->startSection('title'); ?>
    <title><?php echo e($user->name); ?></title>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('user-content'); ?>

  <!--===BREADCRUMB PART START====-->
  <section class="wsus__breadcrumb" style="background: url(<?php echo e($user->banner_image  ? url($user->banner_image):   url($banner_image)); ?>);">
    <div class="wsus_bread_overlay">
        <div class="container">
            <div class="row">
                <div class="col-12 text-center">
                    <h4><?php echo e($user->name); ?></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(__('user.Home')); ?></a></li>
                            <li class="breadcrumb-item active" aria-current="page"><?php echo e($user->name); ?></li>
                        </ol>
                    </nav>
                </div>
            </div>
        </div>
    </div>
</section>
<!--===BREADCRUMB PART END====-->


<!--=========AGENT PROFILE START===========-->
<section class="wsus__agent_profile mt_45 mb_45">
  <div class="container">
    <div class="row">
        <div class="col-xl-12">
            <div class="wsus__main_agent">
                <div class="row">
                    <div class="col-xl-4 col-md-6">
                        <div class="wsus__main_agent_img">
                            <img src="<?php echo e($user->image ? url($user->image) : url($default_profile_image)); ?>" alt="agent img" class="img-fluid w-100">
                        </div>
                    </div>
                    <div class="col-xl-8 col-md-6">
                        <div class="wsus__main_agent_text">
                            <h2><?php echo e($user->name); ?></h2>
                            <p class="agent_description"><?php echo clean($user->about); ?></p>
                            <div class="wsus__main_agent_address">
                                <?php if($user->phone): ?>
                                <a href="callto:<?php echo e($user->phone); ?>"><i class="fal fa-phone-alt"></i> <?php echo e($user->phone); ?></a>
                                <?php endif; ?>
                                <?php if($user->email): ?>
                                    <a href="mailto:<?php echo e($user->email); ?>"><i class="fal fa-envelope"></i> <?php echo e($user->email); ?></a>
                                <?php endif; ?>

                                <?php if($user->website): ?>
                                <a href="<?php echo e($user->website); ?>"><i class="fas fa-globe" aria-hidden="true"></i> <?php echo e($user->website); ?></a>
                                <?php endif; ?>

                                <?php if($user->address): ?>
                                <p><i class="fal fa-map-marker-alt"></i> <?php echo e($user->address); ?></p>
                                <?php endif; ?>

                            </div>

                            <?php if($user_type==1): ?>
                            <ul class="agent_profile_link">
                                <?php if($user->facebook): ?>
                                <li><a href="<?php echo e($user->facebook); ?>"><i class="fab fa-facebook-f"></i></a></li>
                                <?php endif; ?>
                                <?php if($user->twitter): ?>
                                <li><a href="<?php echo e($user->twitter); ?>"><i class="fab fa-twitter"></i></a></li>
                                <?php endif; ?>

                                <?php if($user->linkedin): ?>
                                <li><a href="<?php echo e($user->linkedin); ?>"><i class="fab fa-linkedin-in"></i></a></li>
                                <?php endif; ?>
                                <?php if($user->whatsapp): ?>
                                <li><a href="<?php echo e($user->whatsapp); ?>"><i class="fab fa-whatsapp"></i></a></li>
                                <?php endif; ?>
                            </ul>
                            <?php else: ?>
                            <ul class="agent_profile_link">
                                <?php if($user->icon_one && $user->link_one): ?>
                                <li><a href="<?php echo e($user->link_one); ?>"><i class="<?php echo e($user->icon_one); ?>"></i></a></li>
                                <?php endif; ?>

                                <?php if($user->icon_two && $user->link_two): ?>
                                <li><a href="<?php echo e($user->link_two); ?>"><i class="<?php echo e($user->icon_two); ?>"></i></a></li>
                                <?php endif; ?>

                                <?php if($user->icon_three && $user->link_three): ?>
                                <li><a href="<?php echo e($user->link_three); ?>"><i class="<?php echo e($user->icon_three); ?>"></i></a></li>
                                <?php endif; ?>

                                <?php if($user->icon_four && $user->link_four): ?>
                                <li><a href="<?php echo e($user->link_four); ?>"><i class="<?php echo e($user->icon_four); ?>"></i></a></li>
                                <?php endif; ?>
                            </ul>

                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </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="row mt_45">
      <div class="col-12">
        <div class="wsus__property_topbar agent_det_topbar d-flex justify-content-between mb-4">
          <h4><?php echo e(__('user.Properties')); ?></h4>
          <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>
      </div>
      <div class="col-xl-8 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->translated_custom_purpose); ?></span>

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

                                    <?php if($item->urgent_property==1): ?>
                                        <span class="rent"><?php echo e(__('user.Urgent')); ?></span>
                                    <?php endif; ?>

                                </div>
                                <div class="wsus__single_property_text">
                                    <?php if($item->property_purpose_id==1): ?>
                                        <span class="tk"><?php echo e($currency); ?><?php echo e($item->price); ?></span>
                                    <?php elseif($item->property_purpose_id==2): ?>
                                    <span class="tk"><?php echo e($currency); ?><?php echo e($item->price); ?> /
                                        <?php if($item->period=='Daily'): ?>
                                        <span><?php echo e(__('user.Daily')); ?></span>
                                        <?php elseif($item->period=='Monthly'): ?>
                                        <span><?php echo e(__('user.Monthly')); ?></span>
                                        <?php elseif($item->period=='Yearly'): ?>
                                        <span><?php echo e(__('user.Yearly')); ?></span>
                                        <?php endif; ?>
                                    </span>
                                    <?php endif; ?>

                                    <a href="<?php echo e(route('property.details',$item->slug)); ?>" class="title w-100"><?php echo e($item->translated_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(__('user.Bed')); ?></li>
                                        <li><i class="fal fa-shower"></i> <?php echo e($item->number_of_bathroom); ?> <?php echo e(__('user.Bath')); ?></li>
                                        <li><i class="fal fa-draw-square"></i> <?php echo e($item->area); ?> <?php echo e(__('user.Sqft')); ?></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->translated_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->translated_custom_purpose); ?></span>

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

                                    <?php if($item->urgent_property==1): ?>
                                        <span class="rent"><?php echo e(__('user.Urgent')); ?></span>
                                    <?php endif; ?>

                                </div>
                                <div class="wsus__single_property_text">
                                    <?php if($item->property_purpose_id==1): ?>
                                        <span class="tk"><?php echo e($currency); ?><?php echo e($item->price); ?></span>
                                    <?php elseif($item->property_purpose_id==2): ?>
                                    <span class="tk"><?php echo e($currency); ?><?php echo e($item->price); ?> /
                                        <?php if($item->period=='Daily'): ?>
                                        <span><?php echo e(__('user.Daily')); ?></span>
                                        <?php elseif($item->period=='Monthly'): ?>
                                        <span><?php echo e(__('user.Monthly')); ?></span>
                                        <?php elseif($item->period=='Yearly'): ?>
                                        <span><?php echo e(__('user.Yearly')); ?></span>
                                        <?php endif; ?>
                                    </span>
                                    <?php endif; ?>

                                    <a href="<?php echo e(route('property.details',$item->slug)); ?>" class="title w-100"><?php echo e($item->translated_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(__('user.Bed')); ?></li>
                                        <li><i class="fal fa-shower"></i> <?php echo e($item->number_of_bathroom); ?> <?php echo e(__('user.Bath')); ?></li>
                                        <li><i class="fal fa-draw-square"></i> <?php echo e($item->area); ?> <?php echo e(__('user.Sqft')); ?></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->translated_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(__('user.Property Not Found')); ?></h3>
                </div>
                <?php endif; ?>

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

                </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->translated_custom_purpose); ?></span>

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

                                    <?php if($item->urgent_property==1): ?>
                                        <span class="rent"><?php echo e(__('user.Urgent')); ?></span>
                                    <?php endif; ?>

                                    <?php if($item->property_purpose_id==1): ?>
                                        <span class="tk"><?php echo e($currency); ?><?php echo e($item->price); ?></span>
                                    <?php elseif($item->property_purpose_id==2): ?>
                                    <span class="tk"><?php echo e($currency); ?><?php echo e($item->price); ?> /
                                        <?php if($item->period=='Daily'): ?>
                                        <span><?php echo e(__('user.Daily')); ?></span>
                                        <?php elseif($item->period=='Monthly'): ?>
                                        <span><?php echo e(__('user.Monthly')); ?></span>
                                        <?php elseif($item->period=='Yearly'): ?>
                                        <span><?php echo e(__('user.Yearly')); ?></span>
                                        <?php endif; ?>
                                    </span>
                                    <?php endif; ?>

                                    <a href="<?php echo e(route('property.details',$item->slug)); ?>" class="title w-100"><?php echo e($item->translated_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(__('user.Bed')); ?></li>
                                        <li><i class="fal fa-shower"></i> <?php echo e($item->number_of_bathroom); ?> <?php echo e(__('user.Bath')); ?></li>
                                        <li><i class="fal fa-draw-square"></i> <?php echo e($item->area); ?> <?php echo e(__('user.Sqft')); ?></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->translated_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->translated_custom_purpose); ?></span>

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

                                    <?php if($item->urgent_property==1): ?>
                                        <span class="rent"><?php echo e(__('user.Urgent')); ?></span>
                                    <?php endif; ?>

                                    <?php if($item->property_purpose_id==1): ?>
                                        <span class="tk"><?php echo e($currency); ?><?php echo e($item->price); ?></span>
                                    <?php elseif($item->property_purpose_id==2): ?>
                                    <span class="tk"><?php echo e($currency); ?><?php echo e($item->price); ?> /
                                        <?php if($item->period=='Daily'): ?>
                                        <span><?php echo e(__('user.Daily')); ?></span>
                                        <?php elseif($item->period=='Monthly'): ?>
                                        <span><?php echo e(__('user.Monthly')); ?></span>
                                        <?php elseif($item->period=='Yearly'): ?>
                                        <span><?php echo e(__('user.Yearly')); ?></span>
                                        <?php endif; ?>
                                    </span>
                                    <?php endif; ?>

                                    <a href="<?php echo e(route('property.details',$item->slug)); ?>" class="title w-100"><?php echo e($item->translated_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(__('user.Bed')); ?></li>
                                        <li><i class="fal fa-shower"></i> <?php echo e($item->number_of_bathroom); ?> <?php echo e(__('user.Bath')); ?></li>
                                        <li><i class="fal fa-draw-square"></i> <?php echo e($item->area); ?> <?php echo e(__('user.Sqft')); ?></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->translated_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(__('user.Property Not Found')); ?></h3>
                    </div>
                <?php endif; ?>

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

                </div>
                <?php endif; ?>

            </div>
          </div>
        </div>
      </div>
      <div class="col-xl-4" id="sticky_sidebar">
        <form class="wsus__quick_contact" id="listingAuthContactForm">
            <?php echo csrf_field(); ?> <?php echo csrf_field(); ?>
          <div class="row">
            <div class="col-12 text-center">
              <h4><?php echo e(__('user.Quick Contact')); ?></h4>
            </div>
            <div class="col-xl-12">
              <div class="wsus__quick_con_single">
                <label><?php echo e(__('user.Name')); ?></label>
                <input type="text" name="name">
              </div>
            </div>
            <div class="col-xl-12">
              <div class="wsus__quick_con_single">
                <label><?php echo e(__('user.Email')); ?></label>
                <input type="email" name="email">
              </div>
            </div>

            <div class="col-xl-12">
              <div class="wsus__quick_con_single">
                <label><?php echo e(__('user.Email')); ?></label>
                <input type="text" name="phone">
              </div>
            </div>
            <div class="col-xl-12">
              <div class="wsus__quick_con_single">
                <label><?php echo e(__('user.Subject')); ?></label>
                <input type="text" name="subject">
              </div>
            </div>

            <div class="col-xl-12">
              <div class="wsus__quick_con_single">
                <label><?php echo e(__('user.Description')); ?></label>
                <textarea cols="3" rows="5" name="message"></textarea>
                <input type="hidden" name="user_type" value="<?php echo e($user_type); ?>">
                <?php if($user_type==1): ?>
                <input type="hidden" name="admin_id" value="<?php echo e($user->id); ?>">
                <?php else: ?>
                <input type="hidden" name="user_id" value="<?php echo e($user->id); ?>">
                <?php endif; ?>

                <?php if($recaptcha_setting->status==1): ?>
                <p class="g-recaptcha mb-3" data-sitekey="<?php echo e($recaptcha_setting->site_key); ?>"></p>
                <?php endif; ?>

                <button type="submit" class="common_btn" id="listingAuthorContctBtn"><i id="listcontact-spinner" class="loading-icon fa fa-spin fa-spinner d-none mr-5"></i> <?php echo e(__('user.Send Message')); ?></button>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</section>
<!--=========AGENT PROFILE END==========-->


    <script>
        (function($) {
        "use strict";
        $(document).ready(function () {
            $("#listingAuthorContctBtn").on('click',function(e) {
                e.preventDefault();

                $("#listcontact-spinner").removeClass('d-none')
                $("#listingAuthorContctBtn").addClass('custom-opacity')
                $("#listingAuthorContctBtn").attr('disabled',true);
                $("#listingAuthorContctBtn").removeClass('site-btn-effect')

                $.ajax({
                    url: "<?php echo e(route('user.contact.message')); ?>",
                    type:"post",
                    data:$('#listingAuthContactForm').serialize(),
                    success:function(response){
                        if(response.success){
                            $("#listingAuthContactForm").trigger("reset");
                            toastr.success(response.success)
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')
                        }
                        if(response.error){
                            toastr.error(response.error)
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')

                        }
                    },
                    error:function(response){
                        if(response.responseJSON.errors.name){
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')

                            toastr.error(response.responseJSON.errors.name[0])

                        }

                        if(response.responseJSON.errors.email){
                            toastr.error(response.responseJSON.errors.email[0])
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')

                        }

                        if(response.responseJSON.errors.phone){
                            toastr.error(response.responseJSON.errors.phone[0])
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')
                        }

                        if(response.responseJSON.errors.subject){
                            toastr.error(response.responseJSON.errors.subject[0])
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')
                        }

                        if(response.responseJSON.errors.message){
                            toastr.error(response.responseJSON.errors.message[0])
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')
                        }else{
                            toastr.error('Please Complete the recaptcha to submit the form')
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')
                        }

                        if(response.responseJSON.errors.g-recaptcha-response){
                            toastr.error('Please Complete the recaptcha to submit the form')
                            $("#listcontact-spinner").addClass('d-none')
                            $("#listingAuthorContctBtn").removeClass('custom-opacity')
                            $("#listingAuthorContctBtn").attr('disabled',false);
                            $("#listingAuthorContctBtn").addClass('site-btn-effect')
                        }


                    }

                });


            })

        });

        })(jQuery);
    </script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home3/paprdcor/topriserealtors.com/resources/views/show_agent.blade.php ENDPATH**/ ?>