<?php
/**
 * The template part for Top Header
 *
 * @package Business Association 
 * @subpackage business-association
 * @since business-association 1.0
 */
?>

<div class="main-header <?php if( get_theme_mod( 'business_association_sticky_header', false) == 1 || get_theme_mod( 'business_association_stickyheader_hide_show', false) == 1) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
  <div class="main-topbar py-2 wow fadeInDown">
    <div class="container">
      <div class="row">
        <div class="col-xxl-2 col-xl-2 col-lg-2 col-md-4 col-sm-6 col-6 align-self-center header-left-box">
          <div class="business-association-logo pb-0 pb-md-0">
            <?php if ( has_custom_logo() ) : ?>
              <div class="site-logo"><?php the_custom_logo(); ?></div>
            <?php endif; ?>
            <?php $business_association_blog_info = get_bloginfo( 'name' ); ?>
              <?php if ( ! empty( $business_association_blog_info ) ) : ?>
                <?php if ( is_front_page() && is_home() ) : ?>
                  <?php if( get_theme_mod('business_association_logo_title_hide_show',true) == 1){ ?>
                    <p class="site-title mb-0 text-start"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                  <?php } ?>
                <?php else : ?>
                  <?php if( get_theme_mod('business_association_logo_title_hide_show',true) == 1){ ?>
                    <p class="site-title mb-0 text-start"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                  <?php } ?>
                <?php endif; ?>
              <?php endif; ?>
              <?php
                $business_association_description = get_bloginfo( 'description', 'display' );
                if ( $business_association_description || is_customize_preview() ) :
              ?>
              <?php if( get_theme_mod('business_association_tagline_hide_show',false) == 1){ ?>
                <p class="site-description mb-0 text-start">
                  <?php echo esc_html($business_association_description); ?>
                </p>
              <?php } ?>
            <?php endif; ?>
          </div>
        </div>
        <div class="col-xxl-10 col-xl-10 col-lg-10 col-md-8 col-sm-6 col-6 align-self-center d-flex justify-content-between align-items-center header-right-box">
          <?php get_template_part('template-parts/header/navigation'); ?>
          <?php if ( get_theme_mod('business_association_topbar_button_url') != '') {?>
            <div class ="topbar-btn">
              <a href="<?php echo esc_url(get_theme_mod('business_association_topbar_button_url'));?>"><i class="fa-solid fa-circle-user"></i>
              </a>
            </div>
          <?php }?>
        </div>
      </div>
    </div>
  </div>
</div>