<?php

$slides = $args['data'] ?? array();

if (is_array($slides) && sizeof($slides) > 0) :
?>
	<section class="section-swiper pt-20 md:pt-[170px]  ">


		<div class="swiper swiper-galerie  scroll-appear">

			<div class="swiper-wrapper">
				<?php foreach ($slides as $slide) : ?>
					<div class="swiper-slide">
						<?php echo wp_get_attachment_image($slide, 'full', false, array('loading' => 'lazy', 'class' => '')); ?>
					</div>
				<?php endforeach; ?>
			</div>
			<?php if (sizeof($slides) > 1) : ?>
				<div class="swiper-button-prev">
					<svg width="20" height="11" viewBox="0 0 20 11" fill="none" xmlns="http://www.w3.org/2000/svg">
						<path d="M9.366 0L5.3 4.069H20V6.792H5.3L9.366 10.86H5.43L0 5.43L5.43 0H9.366Z" fill="#ffffff" />
					</svg>

				</div>
				<div class="swiper-button-next">
					<svg width="20" height="11" viewBox="0 0 20 11" fill="none" xmlns="http://www.w3.org/2000/svg">
						<path d="M10.634 10.86L14.7 6.79099L3.55723e-07 6.79098L5.93775e-07 4.06798L14.7 4.06799L10.634 -1.51239e-05L14.57 -1.47798e-05L20 5.42999L14.57 10.86L10.634 10.86Z" fill="#ffffff" />
					</svg>
				</div>
			<?php endif; ?>

		</div>

	</section>
<?php
endif;
