<?php 
/**
 * 
 * @package luzuk
 */
if(get_theme_mod('testimonials_area_disable') != 'on' ){ ?> 
    <?php 
      if( get_theme_mod('testimonials_areaTpadding',true) ) {
        $testimonials_areaTpadding = 'padding-top:'.esc_attr(get_theme_mod('testimonials_areaTpadding')).';';
      }
      if( get_theme_mod('testimonials_areaBpadding',true) ) {
        $testimonials_areaBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('testimonials_areaBpadding')).';';
      }

    ?>  

<div id="testimonials"class="testimonials-area" style="<?php echo esc_attr($testimonials_areaTpadding); ?>" "<?php echo esc_attr($testimonials_areaBpadding); ?>">
  <!-- <div class="tes-olay"></div> -->
    <?php
        $testi_maintitle = get_theme_mod('testi_maintitle', 'Your Success, Our Testimonials');
        $testi_text = get_theme_mod('testi_text', 'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which dont');
        $testi_subtitle = get_theme_mod('testi_subtitle', 'want to became our client ?');
    ?>  
     <div class="container">
        <div class="row">
          <div class="col-xl-6 col-lg-6 col-md-12 ts-title-area">
              <?php if($testi_maintitle){ ?> 
                  <div class="section-title">
                      <h2><?php echo ($testi_maintitle);  ?></h2>
                  </div>
              <?php }?>
              <?php if($testi_text){ ?> 
                  <div class="section-text">
                      <p><?php echo ($testi_text);  ?></p>
                  </div>
              <?php }?>
              <?php if($testi_subtitle){ ?> 
                  <div class="section-subtitle">
                      <h4><?php echo ($testi_subtitle);  ?></h4>
                  </div>
              <?php }?>
          </div>
          <div class="col-xl-6 col-lg-6 col-md-12">
             <div class="swiper-container">
                <div class="swiper-wrapper">
                    <?php 
                    $showStatic = true;
                    $cols = get_theme_mod('test_npp_count', 5);
                    $cols++;
                    switch($cols){
                      case 1:
                        $colCls = 'col-md-12 col-sm-12 col-xs-12';
                        break;
                      case 2:
                        $colCls = 'col-md-6 col-sm-6 col-xs-12';
                        break;
                      case 3:
                      case 5:
                      case 6:
                      case 7:
                      case 8:
                      case 9:
                      case 10:
                      case 11:
                      case 12:
                        $colCls = 'col-md-4 col-sm-6 col-xs-12';
                        break;
                      default:
                        $colCls = 'col-md-3 col-sm-6 col-xs-12';
                        break;
                    }
                    $icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell'); 

                    for( $i = 1; $i <= $cols; $i++ ){
                      $testimonials_page_id = get_theme_mod('testimonials_page'.$i); 
                      $testimonials_page_icon = get_theme_mod('testimonials_page_icon'.$i);
                      if($testimonials_page_id){
                        $showStatic = false;
                        echo testimonialShortCode($testimonials_page_id, $isCustomizer=true, $i);
                      }
                    }
                    // adding the static content
                    if($showStatic === true){
                      for( $i = 1; $i <= $cols; $i++ ){ ?>
                    <div class="swiper-slide">
                        <div class="tetimonoal-area">  
                            <div class="ts-area-single ">
                                <div class="ts-area-c">    
                                      <p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form,
                                      </p>   
                                </div> 
                                <div class="ts-area-content">
                                    <div class="row no-gutter">
                                        <div class="col-xl-5 col-lg-5 col-md-5 col-sm-5 pd-0">
                                            <h3 class="ts-area-title">Jimmy Jam </h3>
                                        </div>
                                         <div class="col-xl-2 col-lg-2 col-md-2 col-sm-2 ">
                                            <div class="ts-area-thumb">
                                                <img class="img-responsive" src="<?php echo get_template_directory_uri(); ?>/images/testi.jpg" alt="">
                                            </div>
                                         </div>
                                         <div class="col-xl-5 col-lg-5 col-md-5 col-sm-5 col-xs-12 pd-0">
                                            <div class="text-designation">Interior Design</div>
                                         </div>
                                    </div>
                                  <div class="clearfix"></div>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <?php 
                    }
                  } ?>
                </div>
            </div>
          </div>
        </div>
      <div class="clearfix"></div>
    </div>
</div>
<script>
    jQuery(document).ready(function($) {
            var mySwiper = new Swiper ('.testimonials-area .swiper-container', {
            direction: 'vertical',
            effect: 'slide',
            slidesPerView: 2,
            loop: true,
            autoplay: {
                delay: 3500,
                // reverseDirection: true,
                disableOnInteraction: false,
            },
        })
    });
</script>
<?php } 

