<?php if ( true == get_theme_mod( 'party_rental_slide_on_off', 'on' ) ) : ?>

<?php
$party_rental_top_twitter_link = get_theme_mod('party_rental_top_twitter_link');
$party_rental_top_linkdin_link = get_theme_mod('party_rental_top_linkdin_link');
$party_rental_top_youtube_link = get_theme_mod('party_rental_top_youtube_link');
$party_rental_top_facebook_link = get_theme_mod('party_rental_top_facebook_link');
$party_rental_top_instagram_link = get_theme_mod('party_rental_top_instagram_link');
$party_rental_slider_background_image = get_theme_mod('party_rental_slider_background_image');
$party_rental_slider_image_1 = get_theme_mod('party_rental_slider_image_1');
$party_rental_slider_short_heading = get_theme_mod('party_rental_slider_short_heading');
$party_rental_slider_main_heading = get_theme_mod('party_rental_slider_main_heading');
$party_rental_slider_price = get_theme_mod('party_rental_slider_price');
$party_rental_slider_button_link = get_theme_mod('party_rental_slider_button_link'); 
$party_rental_slider_button_text = get_theme_mod('party_rental_slider_button_text');
$party_rental_slider_testimonial_heading = get_theme_mod('party_rental_slider_testimonial_heading'); 
$party_rental_slider_testimonial_content = get_theme_mod('party_rental_slider_testimonial_content');
$party_rental_slider_testimonial_image_1 = get_theme_mod('party_rental_slider_testimonial_image_1');
$party_rental_slider_testimonial_image_2 = get_theme_mod('party_rental_slider_testimonial_image_2');
$party_rental_slider_testimonial_image_3 = get_theme_mod('party_rental_slider_testimonial_image_3');
$party_rental_slider_testimonial_image_4 = get_theme_mod('party_rental_slider_testimonial_image_4');

$party_rental_slider_phone_number = get_theme_mod('party_rental_slider_phone_number');
$party_rental_slider_contact_email = get_theme_mod('party_rental_slider_contact_email');

$party_rental_slider_offer_price = get_theme_mod('party_rental_slider_offer_price');
$party_rental_slider_offer_price_text = get_theme_mod('party_rental_slider_offer_price_text');
?>
<section id="home_slider">
	<div class=" slider-box">
		<div class="container">
			<div class="slider_main_box">
				<div class="row">
					<div class="col-xl-6 col-lg-5 col-md-6 align-self-center">
						<div class="slider_content_box wow fadeInDown" data-wow-duration="2s">
							<div class="slider_heading">
								<?php if ( ! empty( $party_rental_slider_short_heading ) ) : ?>
									<h6><?php echo esc_html( $party_rental_slider_short_heading ); ?></h6>
								<?php endif; ?>
								<?php if (! empty( $party_rental_slider_main_heading ) ): ?>
									<h2><?php echo esc_html( $party_rental_slider_main_heading ); ?></h2>
								<?php endif; ?>
								<?php if (! empty( $party_rental_slider_price ) ): ?>
									<p class="m-0"><?php echo esc_html( $party_rental_slider_price ); ?></p>
								<?php endif; ?>
								<div class="slider_button mt-4 mb-5">
									<?php if ( ! empty( $party_rental_slider_button_link ) || ! empty( $party_rental_slider_button_text ) ): ?>
										<a class="button1" href="<?php echo esc_url( $party_rental_slider_button_link ); ?>"><?php echo esc_html( $party_rental_slider_button_text ); ?></a>
									<?php endif; ?>
								</div>
							</div>
						</div>
					</div>
					<div class="col-xl-6 col-lg-7 col-md-6 align-self-center ">
						<?php if ( ! empty( $party_rental_slider_image_1) ) : ?>
							<div class="slider-image-main pt-5">
								<?php if ( ! empty( $party_rental_slider_image_1) ) : ?>
									<img class="slider-img" src="<?php echo esc_url( $party_rental_slider_image_1 ); ?>">
								<?php endif; ?>
								<?php if (! empty( $party_rental_slider_offer_price ) || ! empty( $party_rental_slider_offer_price_text ) ): ?>
									<div class="offer-box">
										<?php if (! empty( $party_rental_slider_offer_price ) ): ?>
											<h6 class="m-0"><?php echo esc_html( $party_rental_slider_offer_price ); ?><span><?php echo esc_html('off ','party-rental'); ?></span></h6>
										<?php endif; ?>
										<?php if ( ! empty( $party_rental_slider_offer_price_text ) ) : ?>
											<p class="m-0"><?php echo esc_html( $party_rental_slider_offer_price_text ); ?></p>
										<?php endif; ?>
										<span class="offer-btn"><?php echo esc_html('OFFER ','party-rental'); ?></span>
									</div>
								<?php endif; ?>
								<?php if (! empty( $party_rental_slider_testimonial_heading ) || ! empty( $party_rental_slider_testimonial_content ) || ! empty( $party_rental_slider_testimonial_image_1 ) || ! empty( $party_rental_slider_testimonial_image_2 ) || ! empty( $party_rental_slider_testimonial_image_3 ) || ! empty( $party_rental_slider_testimonial_image_4 ) ): ?>
									<div class="testimonial-box wow fadeInUp" data-wow-duration="2s">
										<div class="row m-0">
											<div class="col-lg-7 col-md-6 col-sm-6 col-6 align-self-center testimonial-content">
												<?php if (! empty( $party_rental_slider_testimonial_heading ) ): ?>
													<h2 class="m-0"><?php echo esc_html( $party_rental_slider_testimonial_heading ); ?></h2>
												<?php endif; ?>
												<?php if ( ! empty( $party_rental_slider_testimonial_content ) ) : ?>
													<p class="m-0"><?php echo esc_html( $party_rental_slider_testimonial_content ); ?></p>
												<?php endif; ?>
											</div>
											<div class="col-lg-5 col-md-6 col-sm-6 col-6 testimonial-image align-self-center">
												<?php if ( ! empty( $party_rental_slider_testimonial_image_1) ) : ?>
													<img src="<?php echo esc_url( $party_rental_slider_testimonial_image_1 ); ?>">
												<?php endif; ?>
												<?php if ( ! empty( $party_rental_slider_testimonial_image_2 ) ) : ?>
													<img class="testi-image-2" src="<?php echo esc_url( $party_rental_slider_testimonial_image_2 ); ?>">
												<?php endif; ?>
												<?php if ( ! empty( $party_rental_slider_testimonial_image_3 ) ) : ?>
													<img class="testi-image-3" src="<?php echo esc_url( $party_rental_slider_testimonial_image_3 ); ?>">
												<?php endif; ?>
												<?php if ( ! empty( $party_rental_slider_testimonial_image_4 ) ) : ?>
													<img class="testi-image-4" src="<?php echo esc_url( $party_rental_slider_testimonial_image_4 ); ?>">
												<?php endif; ?>
											</div>
										</div>
									</div>
								<?php endif; ?>
								<?php if (! empty( $party_rental_slider_phone_number ) || ! empty( $party_rental_slider_contact_email ) ): ?>
									<div class="contact-box">
										<?php if (! empty( $party_rental_slider_phone_number ) ): ?>
											<p class="m-0"><span><?php echo esc_html('Support : ','party-rental'); ?></span><?php echo esc_html( $party_rental_slider_phone_number ); ?></p>
										<?php endif; ?>
										<?php if ( ! empty( $party_rental_slider_contact_email ) ) : ?>
											<p class="m-0"><span><?php echo esc_html('E-mail: ','party-rental'); ?></span><?php echo esc_html( $party_rental_slider_contact_email ); ?></p>
										<?php endif; ?>
									</div>
								<?php endif; ?>
								<div class="icons-media wow bounceIn">
									<?php if ( ! empty( $party_rental_top_twitter_link ) ): ?>
										<a href="<?php echo esc_url( $party_rental_top_twitter_link ); ?>"><i class="fa fa-twitter me-2" aria-hidden="true"></i>
										</a>
									<?php endif; ?>
									<?php if ( ! empty( $party_rental_top_linkdin_link ) ): ?>
										<a href="<?php echo esc_url( $party_rental_top_linkdin_link ); ?>"><i class="fa fa-linkedin me-2" aria-hidden="true"></i>
										</a>
									<?php endif; ?>
									<?php if ( ! empty( $party_rental_top_youtube_link ) ): ?>
										<a href="<?php echo esc_url( $party_rental_top_youtube_link ); ?>"><i class="fa fa-youtube-play me-2" aria-hidden="true"></i>
										</a>
									<?php endif; ?>
									<?php if ( ! empty( $party_rental_top_facebook_link ) ): ?>
										<a href="<?php echo esc_url( $party_rental_top_facebook_link ); ?>"><i class="fa fa-facebook me-2" aria-hidden="true"></i>
										</a>
									<?php endif; ?>
									<?php if ( ! empty( $party_rental_top_instagram_link ) ): ?>
										<a href="<?php echo esc_url( $party_rental_top_instagram_link ); ?>"><i class="fa fa-instagram me-2" aria-hidden="true"></i>
										</a>
									<?php endif; ?>
								</div>
								<?php if ( get_theme_mod('party_rental_slider_product_category') ) : ?>
									<div class="product-main wow fadeInUp" data-wow-duration="2s">
										<div class="slider-product-section">
											<?php 
											$party_rental_catData = get_theme_mod('party_rental_slider_product_category','');
											if ( class_exists( 'WooCommerce' ) ) {
											$party_rental_args = array(
											'post_type' => 'product',
											'posts_per_page' => 3,
											'product_cat' => $party_rental_catData,
											'order' => 'ASC'
											); ?>
											<div class="owl-carousel">
												<?php $loop = new WP_Query( $party_rental_args );
												while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>        	
												<div class="tab-product text-start">
													<div class="product-image box">
														<figure class="mb-0">
														<?php if (has_post_thumbnail( $loop->post->ID )) echo get_the_post_thumbnail($loop->post->ID, 'shop_catalog'); else echo '<img src="'.esc_url(wc_placeholder_img_src()).'" />'; ?>
													</figure>
													</div>
													<div class="product-details pt-3">
														<h5 class="product-text mb-2"><a href="<?php echo esc_url(get_permalink( $loop->post->ID )); ?>"><?php the_title(); ?></a></h5>
														<h6 class="<?php echo esc_attr( apply_filters( 'woocommerce_product_price_class', 'price' ) ); ?> mb-0"><?php echo $product->get_price_html(); ?></h6>
													</div>
												</div>
												<?php endwhile; wp_reset_postdata(); ?>
												<?php } ?>
											</div>
										</div>
									</div>
								<?php endif; ?>
							</div>
						<?php endif; ?>
					</div>
				</div>
			</div>
		</div>
	</div>
</section>

<?php endif; ?>