<?php
/**
 * The template part for Top Header
 *
 * @package Book Publisher Agency 
 * @subpackage book-publisher-agency
 * @since book-publisher-agency 1.0
 */
?>
<?php if( get_theme_mod( 'book_publisher_agency_topbar_hide_show', true) == 1 || get_theme_mod('book_publisher_agency_responsive_topbar_hide',true)) { ?>
  <div class="top-header">
    <div class="container">
      <div class="row">
        <div class="col-xl-8 col-lg-7 col-md-7 col-sm-5 col-12 text-lg-start text-md-start text-center align-self-center">
          <?php if(get_theme_mod('book_publisher_agency_topbar_add_text_icon') != '' || get_theme_mod('book_publisher_agency_topbar_add_text') != ''){ ?>
           <p class="topbar-text mb-0"> <i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_topbar_add_text_icon','me-2 fa-solid fa-bullhorn')); ?>"></i><?php echo esc_html(get_theme_mod('book_publisher_agency_topbar_add_text')) ?></p>
          <?php }?>
        </div>
        <div class="col-xl-3 col-lg-4 col-md-4 col-sm-5 col-8 text-xl-end text-lg-end text-md-end text-center align-self-center">
          <div class="topbar-social-icon">
            <?php if (is_active_sidebar('topbar-social-icon')) : ?>
              <?php dynamic_sidebar('topbar-social-icon'); ?>
            <?php else : ?>
              <!-- Default Social Icons Widgets -->
              <div class="widget py-0 mt-2">
                  <ul class="custom-social-icons">
                      <li><a href="https://facebook.com" target="_blank"><i class="fab fa-facebook"></i></a></li>
                      <li><a href="https://tumblr.com" target="_blank"><i class="fab fa-tumblr"></i></a></li>
                      <li><a href="https://instgram.com" target="_blank"><i class="fab fa-instagram"></i></a></li>
                      <li><a href="https://linkedin.com" target="_blank"><i class="fab fa-linkedin"></i></a></li>
                      <li><a href="https://pinterest.com" target="_blank"><i class="fab fa-pinterest"></i></a></li>
                      <li><a href="https://youtube.com" target="_blank"><i class="fab fa-youtube"></i></a></li>
                  </ul>
              </div>
            <?php endif; ?>  
          </div>
        </div>
        <div class="col-xl-1 col-lg-1 col-md-1 col-sm-2 col-4 text-xl-end text-lg-end text-md-end text-end align-self-center p-0">
          <?php if( get_theme_mod( 'book_publisher_agency_header_search',true) == 1) { ?>
            <div class="search-box">
              <span><a href="#"><i class='<?php echo esc_attr(get_theme_mod('book_publisher_agency_opensearch_icon','fas fa-search')); ?>'></i></a></span>
            </div>
          <?php }?>
          <div class="serach_outer">
            <div class="closepop"><a href="#maincontent"><i class="<?php echo esc_attr(get_theme_mod('book_publisher_agency_closesearch_icon','fa fa-window-close')); ?>"></i></a></div>
            <div class="serach_inner">
              <?php get_search_form(); ?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
<?php }?>