<?php
/**
 * Displays main header
 *
 * @package Gym Nutrition Shop
 */
?>

<div class="main-header text-center text-md-start">
    <div class="container-fluid">
        <div class="row nav-box">
            <div class="col-xl-7 col-lg-7 col-md-4 ps-md-0 align-self-center header-box">
                <?php get_template_part('template-parts/navigation/nav'); ?>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-6 align-self-center header-right-box">
                <?php if ( get_theme_mod('gym_nutrition_shop_topbar_phone_number') != "" ) {?>
	               <p class="phone m-0 text-center"><a href="tel:<?php echo esc_attr(get_theme_mod('gym_nutrition_shop_topbar_phone_number')); ?>"><i class="fas fa-headphones me-3"></i><?php echo esc_html(get_theme_mod('gym_nutrition_shop_topbar_phone_number')); ?></a></p>  
		        <?php }?>
            </div>
            <div class="col-xl-2 col-lg-2 col-md-2 align-self-center">
                <div class="cart-wishlist">
                    <?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','gym-nutrition-shop'); ?>"><i class="fas fa-user"></i></a>
                            <?php } ?>
                        </span>
                    <?php }?>
                    <?php if ( get_theme_mod('gym_nutrition_shop_topbar1_wishlist_url') != "" ) {?>
                        <span class="wish-btn">
                            <a href="<?php echo esc_url(get_theme_mod('gym_nutrition_shop_topbar1_wishlist_url')); ?>"><i class="fas fa-heart"></i></a>
                        </span>
                    <?php }?>
                    <?php if(class_exists('woocommerce')){ ?>
                        <span class="cart_no">
                            <?php global $woocommerce; ?>
                            <a class="cart-customlocation" href="<?php echo esc_url(wc_get_cart_url()); ?>" title="<?php esc_attr_e( 'shopping cart','gym-nutrition-shop' ); ?>"><i class="fas fa-shopping-cart"></i></a>
                        </span>
                    <?php }?>
                </div>
            </div>
        </div>
    </div>
</div>
