<?php
$options = _WSH()->option();
$topbar = buildark_set( $options, 'show_topbar_header1' );
$welcome = buildark_set( $options, 'header1_welcome' );
$socials_media = buildark_set( $options, 'social_media1' );
$social_media = buildark_set( $socials_media, 'social_media1' );
$lang = buildark_set( $options, 'header1_lang' );
?>
<!--Header Top-->
<?php if ( $topbar ) :  ?>

<div class="header-top-one">
	<div class="auto-container">
		<div class="clearfix">
			<div class="top-left">
				<ul class="clearfix">
					<li><?php echo wp_kses_post( $welcome ); ?></li>
				</ul>
			</div>
			<div class="top-right clearfix">
				<ul class="clearfix">
					<li>
						<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>
					
					<?php if(buildark_set($options, 'lang_switcher')): ?>
                        <div id="polyglotLanguageSwitcher">
                            <?php do_action('wpml_add_language_selector'); ?>
                        </div>
                    <?php endif;?>
					
				</ul>

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

<?php endif; ?>