<?php
/**
 * The template part for Middle Header
 *
 * @package Book Publisher Agency 
 * @subpackage book-publisher-agency
 * @since book-publisher-agency 1.0
 */
?>

<div class="main-header <?php if( get_theme_mod( 'book_publisher_agency_sticky_header', false) == 1 || get_theme_mod( 'book_publisher_agency_stickyheader_hide_show', false) == 1) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
  <div class="container main-top-bar">
    <div class="row">
      <div class="col-xl-2 col-lg-2 col-md-6 col-sm-6 col-8 align-self-center text-lg-start text-md-start text-sm-start text-start">
        <div class="logo pb-0 pb-md-0">
          <?php if ( has_custom_logo() ) : ?>
            <div class="site-logo"><?php the_custom_logo(); ?></div>
          <?php endif; ?>
          <?php $book_publisher_agency_blog_info = get_bloginfo( 'name' ); ?>
            <?php if ( ! empty( $book_publisher_agency_blog_info ) ) : ?>
              <?php if ( is_front_page() && is_home() ) : ?>
                <?php if( get_theme_mod('book_publisher_agency_logo_title_hide_show',true) == 1){ ?>
                  <p class="site-title mb-0"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                <?php } ?>
              <?php else : ?>
                <?php if( get_theme_mod('book_publisher_agency_logo_title_hide_show',true) == 1){ ?>
                  <p class="site-title mb-0"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                <?php } ?>
              <?php endif; ?>
            <?php endif; ?>
            <?php
              $book_publisher_agency_description = get_bloginfo( 'description', 'display' );
              if ( $book_publisher_agency_description || is_customize_preview() ) :
            ?>
            <?php if( get_theme_mod('book_publisher_agency_tagline_hide_show',false) == 1){ ?>
              <p class="site-description mb-0">
                <?php echo esc_html($book_publisher_agency_description); ?>
              </p>
            <?php } ?>
          <?php endif; ?>
        </div>
      </div>
      <div class="col-xl-10 col-lg-10 col-md-6 col-sm-6 col-4 align-self-center text-lg-end text-md-end text-sm-end text-end p-0">
        <?php get_template_part('template-parts/header/navigation'); ?>
      </div>
    </div>
  </div>
</div>