{% set count = 0 %}
{% set rows = slide.rows %}
{% if not rows %}
	{% set rows = 1 %}
{% endif %}
<div class="testimonial-block mt-80">
	<div class="container">
		<div class="testimonial-container box-module">		
			<div class="page-title"><h3>{{ title }}</h3></div>	
			<div class="row">
				<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">
										{% set count = count + 1 %}
										{% endif %}
										<div class="testimonial-images">
											<img src="{{ testimonial.image }}" alt="{{ testimonial.customer_name }}" class="m-image-auto m-auto img-circle">
										</div>
										<div class="testimonial-text"><p>{{ testimonial.content }}</p></div>
										<div class="testimonial-content">
											<div class="testimonial-author">{{ testimonial.customer_name }}</div>
											<div class="testimonial-customer">{{ text_customer }}</div>
										</div>				
										{% if count % rows == 0 or count == count.testimonials %}
									</div>
								{% endif %} 
							{% endfor %}
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script><!--
		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 },
					1201: { items: 1 }
				}
			};

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