<?php
if ( ! get_theme_mod( 'handmade_craft_enable_banner_section', false ) ) {
	return;
}

/**
 * Render Banner Section.
 */ 

$handmade_craft_banner_section_sub_heading = get_theme_mod( 'handmade_craft_banner_section_sub_heading');
$handmade_craft_banner_section_heading = get_theme_mod( 'handmade_craft_banner_section_heading');
$handmade_craft_banner_section_content = get_theme_mod( 'handmade_craft_banner_section_content');
$handmade_craft_banner_right_title = get_theme_mod( 'handmade_craft_banner_right_title');
$handmade_craft_banner_image_title = get_theme_mod( 'handmade_craft_banner_image_title');
$handmade_craft_banner_button_label_one = get_theme_mod( 'handmade_craft_banner_button_label_one');
$handmade_craft_banner_button_link_one  = get_theme_mod( 'handmade_craft_banner_button_link_one');
$handmade_craft_banner_button_label_two = get_theme_mod( 'handmade_craft_banner_button_label_two');
$handmade_craft_banner_button_link_two  = get_theme_mod( 'handmade_craft_banner_button_link_two');
$handmade_craft_default_image_url = get_template_directory_uri() . '/resource/img/default.png';
$handmade_craft_banner_section_image = get_theme_mod( 'handmade_craft_banner_section_image');
?>

<section id="handmade_craft_banner_section primary" class="banner-section wow bounceInDown delay-4000">
	<?php
	if ( is_customize_preview() ) :
		handmade_craft_section_link( 'handmade_craft_banner_section' );
	endif;
	?>
	<div class="banner-section-wrapper">
		<div class="asterthemes-wrapper">
			<div class="banner-single-outer">
				<div class="banner-single">
					<div class="banner-caption">
						<div class="banner-catption-wrapper">
							<h4 class="banner-caption-sub-title">
								<a href="<?php the_permalink(); ?>"><?php echo esc_html( $handmade_craft_banner_section_sub_heading ); ?></a>
							</h4>
							<h1 class="banner-caption-title">
								<a href="<?php the_permalink(); ?>"><?php echo esc_html( $handmade_craft_banner_section_heading ); ?></a>
							</h1>
							<p class="banner-caption-content">
								<?php echo esc_html( $handmade_craft_banner_section_content ); ?>
							</p>
							<div class="banner-btn">
								<?php if ( ! empty( $handmade_craft_banner_button_label_one ) ) { ?>
									<span class="banner-slider-btn">
										<a href="<?php echo esc_url( $handmade_craft_banner_button_link_one ); ?>" class="asterthemes-button"><?php echo esc_html( $handmade_craft_banner_button_label_one ); ?> <i class="fas fa-arrow-right"></i></a>
									</span>
								<?php } ?>
								<?php if ( ! empty( $handmade_craft_banner_button_label_two ) ) { ?>
									<span class="banner-slider-btn-1">
										<a href="<?php echo esc_url( $handmade_craft_banner_button_link_two ); ?>" class="asterthemes-buttons"><?php echo esc_html( $handmade_craft_banner_button_label_two ); ?></a>
									</span>
								<?php } ?>
							</div>
						</div>
					</div>
					<div class="banner-img">
						<div class="shape"></div>
						<?php
						if ( ! empty( $handmade_craft_banner_section_image ) ) { ?>
							<img src="<?php echo esc_url( $handmade_craft_banner_section_image ); ?>"/>
						<?php } else { ?>
							<img src="<?php echo esc_url( $handmade_craft_default_image_url ); ?>"/>
						<?php } ?>
					</div>
				</div>
			</div>		
		</div>
	</div>
</section>