<?php
if ( ! function_exists( 'leatherhouse_above_header' ) ) :
	function leatherhouse_above_header() {
		$hide_show_social_icon   = get_theme_mod( 'hide_show_social_icon', true );
		$hide_show_cntct_details = get_theme_mod( 'hide_show_cntct_details', true );
		$hide_show_email_details = get_theme_mod( 'hide_show_email_details', true );
		$hide_show_mbl_details   = get_theme_mod( 'hide_show_mbl_details', true );
		if ( $hide_show_social_icon == true || $hide_show_cntct_details == true || $hide_show_email_details == true || $hide_show_mbl_details == true ) :
			?>
			<div id="above-header" class="header-above-info d-av-block theme-d-none">
				<div class="header-widget">
					<div class="<?php echo esc_attr( leatherhouse_menu_size() ); ?>">
						<div class="av-columns-area">
							<div class="av-column-5">
								<div class="widget-left text-av-left text-center">
									<?php
										// above_header_first.
										$leatherhouse_topbar_icon_disable = get_theme_mod( 'leatherhouse_topbar_icon_disable', true );
										if ( true === $leatherhouse_topbar_icon_disable ) {
											?>
												<aside class="share-toolkit widget widget_social_widget">
													<ul>
														<li><a href="#"><i class="fa fa-facebook"></i></a></li>
														<li><a href="#"><i class="fa fa-twitter"></i></a></li>
														<li><a href="#"><i class="fa fa-instagram"></i></a></li>
													</ul>
												</aside>
											<?php
										}
									?>
								</div>
							</div>
							<div class="av-column-7">
								<div class="widget-right text-av-right text-center">                                
									<?php
										$leatherhouse_contact_detail_disable = get_theme_mod( 'leatherhouse_contact_detail_disable', true );
										$leatherhouse_contact_detail_icon    = get_theme_mod( 'leatherhouse_contact_detail_icon', 'fa-support' );
										$leatherhouse_contact_detail_text    = get_theme_mod( 'leatherhouse_contact_detail_text', 'Live Chat' );
										$leatherhouse_contact_detail_link    = get_theme_mod( 'leatherhouse_contact_detail_link' );
									if ( true === $leatherhouse_contact_detail_disable ) {
										?>
												<aside class="widget widget-contact wgt-1">
													<div class="contact-area">
													<?php if ( ! empty( $leatherhouse_contact_detail_icon ) ) : ?>
															<div class="contact-icon">
																<i class="fa <?php echo esc_attr( $leatherhouse_contact_detail_icon ); ?>"></i>
															</div>
														<?php endif; ?>
														<a href="<?php echo esc_url( $leatherhouse_contact_detail_link ); ?>" class="contact-info">
															<span class="title contact"><?php echo esc_html( $leatherhouse_contact_detail_text ); ?></span>
														</a>
													</div>
												</aside>
											<?php
									}
										$leatherhouse_email_detail_disable = get_theme_mod( 'leatherhouse_email_detail_disable', true );
										$leatherhouse_email_detail_icon    = get_theme_mod( 'leatherhouse_email_detail_icon', 'fa-envelope' );
										$leatherhouse_email_detail_text    = get_theme_mod( 'leatherhouse_email_detail_text', 'info@example.com' );
										$leatherhouse_email_detail_link    = get_theme_mod( 'leatherhouse_email_detail_link' );
									?>
										<?php if ( true == $leatherhouse_email_detail_disable ) { ?>
												<aside class="widget widget-contact wgt-2">
													<div class="contact-area">
														<?php if ( ! empty( $leatherhouse_email_detail_icon ) ) : ?>
															<div class="contact-icon">
																<i class="fa <?php echo esc_attr( $leatherhouse_email_detail_icon ); ?>"></i>
															</div>
														<?php endif; ?>	
														<a href="<?php echo esc_url( $leatherhouse_email_detail_link ); ?>" class="contact-info">
															<span class="title email"><?php echo esc_html( $leatherhouse_email_detail_text ); ?></span>
														</a>
													</div>
												</aside>
											<?php
										}
											$leatherhouse_mobile_detail_disable = get_theme_mod( 'leatherhouse_mobile_detail_disable', true );
											$leatherhouse_mobile_detail_icon    = get_theme_mod( 'leatherhouse_mobile_detail_icon', 'fa-whatsapp' );
											$leatherhouse_mobile_detail_text    = get_theme_mod( 'leatherhouse_mobile_detail_text', '+01-9876543210' );
											$leatherhouse_mobile_detail_link    = get_theme_mod( 'leatherhouse_mobile_detail_link' );
										?>
										<?php if ( true === $leatherhouse_mobile_detail_disable ) { ?>
											<aside class="widget widget-contact wgt-3">
												<div class="contact-area">
													<?php if ( ! empty( $leatherhouse_mobile_detail_icon ) ) : ?>
														<div class="contact-icon">
															<i class="fa <?php echo esc_attr( $leatherhouse_mobile_detail_icon ); ?>"></i>
														</div>
													<?php endif; ?>	
													<a href="<?php echo esc_url( $leatherhouse_mobile_detail_link ); ?>" class="contact-info">
														<span class="title mobile"><?php echo esc_html( $leatherhouse_mobile_detail_text ); ?></span>
													</a>
												</div>
											</aside>
										<?php } ?>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		<?php endif;
	} endif;
add_action( 'leatherhouse_above_header', 'leatherhouse_above_header' );
?>
