<?php
/**
 * Template part for displaying header topbar
 *
 * @package    Wira
 * @since      1.0.0
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$wira_email_text        = get_theme_mod( 'wira_email_text', 'info@example.com' );
$wira_telephone_text    = get_theme_mod( 'wira_telephone_text', '+62 123 456 789' );
$wira_facebook_enabled  = get_theme_mod( 'wira_enable_social_facebook', true );
$wira_twitter_enabled   = get_theme_mod( 'wira_enable_social_twitter', true );
$wira_linkedin_enabled  = get_theme_mod( 'wira_enable_social_linkedin', true );
$wira_pinterest_enabled = get_theme_mod( 'wira_enable_social_pinterest', true );

$wira_facebook_link  = get_theme_mod( 'wira_facebook_social_link', '#' );
$wira_twitter_link   = get_theme_mod( 'wira_twitter_social_link', '#' );
$wira_linkedin_link  = get_theme_mod( 'wira_linkedin_social_link', '#' );
$wira_pinterest_link = get_theme_mod( 'wira_pinterest_social_link', '#' );

?>

<!-- Main Topbar Wrapper -->
<div class="theme-topbar container-fluid theme-bg-dark">

	<!-- Topbar Section Wrapper -->
	<div class="container theme-section py-3">
		<div class="row align-items-center">

			<!-- Tobar Column Left -->
			<div class="col-md-6 col-12">
				<ul class="theme-topbar-icon-list d-flex justify-content-md-start justify-content-center mb-0">

					<!-- Email -->
					<li class="me-5 theme-topbar-email">
						<i class="fas fa-envelope theme-icon-extra-small theme-color-white me-1"></i>
						<span class="theme-text-small theme-color-white-overlay">
							<?php echo esc_html( $wira_email_text ); ?>
						</span>
					</li>

					<!-- Phone -->
					<li class="theme-topbar-phone">
						<i class="fas fa-phone theme-icon-extra-small theme-color-white me-1"></i>
						<span class="theme-text-small theme-color-white-overlay">
							<?php echo esc_html( $wira_telephone_text ); ?>
						</span>
					</li>
				</ul>
			</div> <!-- Tobar Column Left /End -->

			<!-- Topbar Column Right -->
			<div class="col-md-6 col-12 mt-md-0 mt-3">
				<ul class="theme-topbar-social-icon d-flex justify-content-md-end justify-content-center mb-0">

					<!-- Facebook Social Icons -->
					<?php if ( $wira_facebook_enabled ) : ?>
						<li class="ms-md-3 ms-1 me-md-0 me-1 theme-social-facebook">
							<a class="theme-btn-text-three"
								href="<?php echo esc_url( $wira_facebook_link ); ?>" target="_blank" rel="noopener">
								<i class="fab fa-facebook theme-icon-extra-small"></i>
							</a>
						</li>
					<?php endif; ?>

					<!-- Twitter X Social Icons -->
					<?php if ( $wira_twitter_enabled ) : ?>
						<li class="ms-md-3 ms-1 me-md-0 me-1 theme-social-twitter">
							<a class="theme-btn-text-three"
								href="<?php echo esc_url( $wira_twitter_link ); ?>" target="_blank" rel="noopener">
								<i class="fab fa-x-twitter theme-icon-extra-small"></i>
							</a>
						</li>
					<?php endif; ?>

					<!-- LinkedIn Social Icons -->
					<?php if ( $wira_linkedin_enabled ) : ?>
						<li class="ms-md-3 ms-1 me-md-0 me-1 theme-social-linkedin">
							<a class="theme-btn-text-three"
								href="<?php echo esc_url( $wira_linkedin_link ); ?>" target="_blank" rel="noopener">
								<i class="fab fa-linkedin theme-icon-extra-small"></i>
							</a>
						</li>
					<?php endif; ?>

					<!-- Pinterest Social Icons -->
					<?php if ( $wira_pinterest_enabled ) : ?>
						<li class="ms-md-3 ms-1 me-md-0 me-1 theme-social-pinterest">
							<a class="theme-btn-text-three"
								href="<?php echo esc_url( $wira_pinterest_link ); ?>" target="_blank" rel="noopener">
								<i class="fab fa-pinterest theme-icon-extra-small"></i>
							</a>
						</li>
					<?php endif; ?>
				</ul>
			</div> <!-- Topbar Column Right /End -->
		</div>
	</div> <!-- Topbar Section Wrapper /End -->
</div> <!-- Main Topbar Wrapper /End -->
