<?php
/**
 * Displays top header
 *
 * @package Store Eshop
 */
?>

<div class="top-info">
	<div class="container">
		<div class="row">
			<div class="col-xl-5 col-lg-5 col-md-12 col-sm-12 align-self-center text-center text-lg-start">
				<?php if( get_theme_mod('store_eshop_top_header_about_us_button_url') != '' || get_theme_mod('store_eshop_top_header_about_us_button_text') != ''){ ?>
                    <span class="head-btn">
                        <a href="<?php echo esc_attr(get_theme_mod('store_eshop_top_header_about_us_button_url')); ?>"><?php echo esc_html(get_theme_mod('store_eshop_top_header_about_us_button_text')); ?></a>
                    </span>
                <?php } ?>
				<?php if( get_theme_mod('store_eshop_top_header_myaccount_button_url') != '' || get_theme_mod('store_eshop_top_header_myacount_button_text') != ''){ ?>
                    <span class="head-btn">
                        <a href="<?php echo esc_attr(get_theme_mod('store_eshop_top_header_myaccount_button_url')); ?>"><?php echo esc_html(get_theme_mod('store_eshop_top_header_myacount_button_text')); ?></a>
                    </span>
                <?php } ?>
				<?php if( get_theme_mod('store_eshop_top_header_wishlist_button_url') != '' || get_theme_mod('store_eshop_top_header_wishlist_button_text') != ''){ ?>
                    <span class="head-btn">
                        <a href="<?php echo esc_attr(get_theme_mod('store_eshop_top_header_wishlist_button_url')); ?>"><?php echo esc_html(get_theme_mod('store_eshop_top_header_wishlist_button_text')); ?></a>
                    </span>
                <?php } ?>
				<?php if( get_theme_mod('store_eshop_top_header_order_button_url') != '' || get_theme_mod('store_eshop_top_header_order_button_text') != ''){ ?>
                    <span class="head-btn">
                        <a href="<?php echo esc_attr(get_theme_mod('store_eshop_top_header_order_button_url')); ?>"><?php echo esc_html(get_theme_mod('store_eshop_top_header_order_button_text')); ?></a>
                    </span>
                <?php } ?>
				<?php if( get_theme_mod('store_eshop_top_header_tracking_button_url') != '' || get_theme_mod('store_eshop_top_header_tracking_button_text') != ''){ ?>
                    <span class="head-btn">
                        <a href="<?php echo esc_attr(get_theme_mod('store_eshop_top_header_tracking_button_url')); ?>"><?php echo esc_html(get_theme_mod('store_eshop_top_header_tracking_button_text')); ?></a>
                    </span>
                <?php } ?>
			</div>
			<div class="col-xl-2 col-lg-2 col-md-6 col-sm-12 align-self-center">
				<?php if ( get_theme_mod('store_eshop_topbar_text') != "" ) {?>
			        <div class="text-center py-2">
			            <p class="topbar-text"><i class="fas fa-bolt me-1"></i><?php echo esc_html(get_theme_mod('store_eshop_topbar_text')); ?></p>  
			        </div>
		        <?php }?>
			</div>
			<div class="col-lg-5 col-md-6 col-sm-12 col-12 align-self-center right-box">
                <span class="text-center translate-btn">
                    <?php if(class_exists('GTranslate')){ ?>
                        <?php echo do_shortcode('[gtranslate]', 'store-eshop');?>
                    <?php }?>
                </span>
                <?php if(class_exists('WOOCS')){ ?>
                    <span class="currency">
                        <?php echo do_shortcode('[woocs]');?>
                    </span>
                <?php }?>
				<?php if(class_exists('woocommerce')){ ?>
                    <span class="user-btn">
                        <?php if ( is_user_logged_in() ) { ?>
                            <a class="account-btn" href="<?php echo esc_url( get_permalink( get_option('woocommerce_myaccount_page_id') ) ); ?>" title="<?php esc_attr_e('My Account','store-eshop'); ?>"><i class="far fa-user"></i><?php esc_html_e('My Account','store-eshop'); ?></a>
                        <?php } 
                        else { ?>
                            <a class="account-btn" href="<?php echo esc_url( get_permalink( get_option('woocommerce_myaccount_page_id') ) ); ?>" title="<?php esc_attr_e('My Account','store-eshop'); ?>"><?php esc_html_e('My Account','store-eshop'); ?></a>
                        <?php } ?>
                    </span>
                <?php }?>
            </div>
		</div>
	</div>
</div>