<?php
$options = _WSH()->option();
$topbar = buildark_set( $options, 'show_topbar_header4' );
$address = buildark_set( $options, 'header4_address' );
$phone = buildark_set( $options, 'header4_phone' );
$email = buildark_set( $options, 'header4_email' );
$socials_media = buildark_set( $options, 'social_media4' );
$social_media = buildark_set( $socials_media, 'social_media4' );

if ( $topbar ) :

?>


<!--Header Top-->
<div class="header-top-four">
	<div class="auto-container">
		<div class="clearfix">
			<div class="top-left">
				<ul class="clearfix">
				
					<?php if ( $address ) :  ?>
					
						<li><span class="icon flaticon-map-marker"></span><?php echo wp_kses_post( $address );  ?></li>
						
					<?php endif;  ?>
						
					<?php if ( $phone ) :  ?>

						<li><span class="icon fa fa-phone"></span><?php echo wp_kses_post( $phone );  ?></li>
						
					<?php endif;  ?>
						
					<?php if ( $email ) : ?>

						<li><span class="icon fa fa-envelope"></span><?php echo sanitize_email( $email );  ?></li>
						
					<?php endif;  ?>
					
				</ul>
			</div>
			<div class="top-right clearfix">
				<ul class="clearfix">
					<li>
						<?php esc_html_e( 'Stay Connected:', 'buildark' );  ?>
						<div class="social-links">
							
							<?php  if ( $social_media ) :  ?>
						
								<?php  foreach ( $social_media as $media ) :

									if ( isset( $media['tocopy' ] ) ) continue;

									$link = buildark_set( $media, 'social_link');

									$icon = buildark_set( $media, 'social_icon');

								?>

									<a href="<?php echo esc_url( $link ); ?>">
										<span class="fa <?php echo esc_attr( $icon ); ?>"></span>
									</a>

								<?php endforeach; ?>
								
							<?php endif; ?>
							
						</div>
					</li>
				</ul>

			</div>
		</div>
	</div>
</div>


<?php endif; ?>