{% set count = 0 %}
{% set rows = slide.rows %}
{% if not rows %}
	{% set rows = 1 %}
{% endif %}
<div class="testimonial-block">
	<div class="testimonial-container box-module">		
		<div class="page-title"><h3>{{ title }}</h3></div>
		<div class="owl-container">
			<div class="block-content">
				<div class="slideTestimonial owl-carousel owl-theme">
					{% for testimonial in testimonials %}
						{% if count % rows == 0 %}
							<div class="row-items col-xs-12">
								{% set count = count + 1 %}
								{% endif %}
								<div class="testimonial-inner">
									<div class="testimonial-images">
										<img src="{{ testimonial.image }}" alt="{{ testimonial.customer_name }}" class="m-image-auto m-auto img-circle">
										<div class="testimonial-content">
											<div class="testimonial-author">{{ testimonial.customer_name }}</div>
											<div class="testimonial-customer">{{ text_customer }}</div>
										</div>
									</div>
									<div class="testimonial-text"><p>{{ testimonial.content }}</p></div>
								</div>
															
								{% if count % rows == 0 or count == count.testimonials %}
							</div>
						{% endif %} 
					{% endfor %}
				</div>
			</div>
		</div>
	</div>
</div>
<script><!--
$(document).ready(function() {
	setTestimonialCarousel();
});
function setTestimonialCarousel() {
	const direct = $('html').attr('dir');
	const items = {{ slide.items }};
	$(".slideTestimonial").each(function (){
		const sliderOptions = {
			loop: false,
			nav: {% if slide.navigation %} true {% else %} false {% endif %},
			navText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
			dots: {% if slide.pagination %} true {% else %} false {% endif %},
			items: items,
			autoplay: {% if slide.auto %} true {% else %} false {% endif %},
			autoplayTimeout: {{ slide.speed }},
			responsiveRefreshRate: 200,
			responsive: {
				0: { items: 1 },
				992: { items: 2 }
			}
		};

		if (direct == 'rtl') sliderOptions['rtl'] = true;
    	$(this).owlCarousel(sliderOptions);
	});
}
//--></script>