<?php
/**
 * Displays top header
 *
 * @package Audio Player
 */
?>

<div class="top-info text-end py-2">
	<div class="container">
        <div class="row">
            <div class="col-lg-6 col-md-2 col-sm-12 col-12 align-self-center">
            </div>
            <div class="col-lg-3 col-md-6 col-sm-12 col-12 align-self-center">
                <div class="social-link">
                    <?php if(get_theme_mod('audio_player_facebook_url') != ''){ ?>
                      <a href="<?php echo esc_url(get_theme_mod('audio_player_facebook_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('audio_player_facebook_icon') ); ?>"></i></a>
                    <?php }?>
                    <?php if(get_theme_mod('audio_player_twitter_url') != ''){ ?>
                      <a href="<?php echo esc_url(get_theme_mod('audio_player_twitter_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('audio_player_twitter_icon') ); ?>"></i></a>
                    <?php }?>
                    <?php if(get_theme_mod('audio_player_intagram_url') != ''){ ?>
                      <a href="<?php echo esc_url(get_theme_mod('audio_player_intagram_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('audio_player_intagram_icon') ); ?>"></i></a>
                    <?php }?>
                    <?php if(get_theme_mod('audio_player_linkedin_url') != ''){ ?>
                      <a href="<?php echo esc_url(get_theme_mod('audio_player_linkedin_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('audio_player_linkedin_icon') ); ?>"></i></a>
                    <?php }?>
                    <?php if(get_theme_mod('audio_player_pintrest_url') != ''){ ?>
                      <a href="<?php echo esc_url(get_theme_mod('audio_player_pintrest_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('audio_player_pintrest_icon') ); ?>"></i></a>
                    <?php }?>
                </div>
            </div>
            <div class="col-lg-3 col-md-4 col-sm-12 col-12 align-self-center right-box">
                <?php if ( get_theme_mod('audio_player_topbar_register_button') != "" || get_theme_mod('audio_player_topbar_register_button_url') != ""  ) {?>
                   <span class="register-btn"><a href="<?php echo esc_url(get_theme_mod('audio_player_topbar_register_button_url')); ?>"><?php echo esc_html(get_theme_mod('audio_player_topbar_register_button')); ?></a></span>
                <?php }?>
                <?php if(class_exists('woocommerce')){ ?>
                    <span class="user-btn-top">
                        <?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','audio-player'); ?>"><i class="fas fa-lock"></i><?php esc_html_e('Logout','audio-player'); ?></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','audio-player'); ?>"><i class="fas fa-lock-open"></i><?php esc_html_e('Login','audio-player'); ?></a>
                        <?php } ?>
                    </span>
                <?php }?>
            </div>
        </div>
	</div>
</div>