<?php if ( true == get_theme_mod( 'flight_booking_slide_on_off', 'off' ) ) : ?>

<?php $slide_count = get_theme_mod('flight_booking_slide_count'); ?>

<section id="home_slider">
	<div class="owl-carousel">
		<?php for ($i=1; $i <= $slide_count; $i++) {
			
			$flight_booking_slider_image = get_theme_mod('flight_booking_slider_image'.$i);
			$flight_booking_slider_short_heading = get_theme_mod('flight_booking_slider_short_heading'.$i);
			$flight_booking_slider_heading = get_theme_mod('flight_booking_slider_heading'.$i);
			$flight_booking_slider_heading_link = get_theme_mod('flight_booking_slider_heading_link'.$i); 
			$flight_booking_slider_content = get_theme_mod('flight_booking_slider_content'.$i); 
			$flight_booking_slider_button1_text = get_theme_mod('flight_booking_slider_button1_text'.$i);
			$flight_booking_slider_button1_link = get_theme_mod('flight_booking_slider_button1_link'.$i); 
			$flight_booking_slider_button2_text = get_theme_mod('flight_booking_slider_button2_text'.$i); 
			$flight_booking_slider_button2_link = get_theme_mod('flight_booking_slider_button2_link'.$i);  ?>

			<div class="slider_main_box">
				<?php if ( ! empty( $flight_booking_slider_image ) ) : ?>
					<img src="<?php echo esc_url( $flight_booking_slider_image ); ?>">
					<div class="slider_content_box wow zoomIn" data-wow-duration="2s">
						<?php if ( ! empty( $flight_booking_slider_short_heading ) ) : ?>
							<h5><?php echo esc_html( $flight_booking_slider_short_heading ); ?></h5>
						<?php endif; ?>
						<?php if ( ! empty( $flight_booking_slider_heading_link ) || ! empty( $flight_booking_slider_heading ) ): ?>
							<h3><a href="<?php echo esc_url( $flight_booking_slider_heading_link ); ?>"><?php echo esc_html( $flight_booking_slider_heading ); ?></a></h3>
						<?php endif; ?>
						<?php if ( ! empty( $flight_booking_slider_content ) ) : ?>
							<p><?php echo esc_html( $flight_booking_slider_content ); ?></p>
						<?php endif; ?>
						<?php if ( ! empty( $flight_booking_slider_button1_text ) || ! empty( $flight_booking_slider_button1_link ) ): ?>
							<a class="slider-btn" href="<?php echo esc_url( $flight_booking_slider_button1_link ); ?>"><?php echo esc_html( $flight_booking_slider_button1_text ); ?></a>
						<?php endif; ?>
						<?php if ( ! empty( $flight_booking_slider_button2_link ) || ! empty( $flight_booking_slider_button2_text ) ): ?>
							<a class="slider-btn" href="<?php echo esc_url( $flight_booking_slider_button2_link ); ?>"><?php echo esc_html( $flight_booking_slider_button2_text ); ?></a>
						<?php endif; ?>
					</div>
				<?php endif; ?>
			</div>
		<?php } ?>
	</div>
</section>

<?php endif; ?>