<?php
/**
 * Template part for displaying header content
 *
 * @package vw_book_store_pro
 */
 $menu_width="";
  if ( get_theme_mod('vw_book_store_pro_site_menu_width',true) != "" ) {
    $menu_width=get_theme_mod('vw_book_store_pro_site_menu_width','250');
  }
if(get_theme_mod('vw_book_store_pro_head_sticky_header', true) == false){
  $sticky_class = 'not_sticky';
}
else{
  $sticky_class = 'yes_sticky';
}
?>
<div class="menubar <?php echo esc_attr($sticky_class); ?>">
  <div class="container right_menu">
    <div class="row bg-media">
      <div class="col-lg-3 col-md-4 col-sm-8 col-10">
        <div class="logo">
          <?php
                 if( has_custom_logo() ){  vw_book_store_pro_the_custom_logo();  }
                 $logo= get_theme_mod( 'custom_logo' );
                 if($logo){ ?>
              <div class="logo-text">
                 <?php if( get_theme_mod('vw_book_store_pro_display_title', true) != ''){ ?>
                 <h2><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php esc_attr(bloginfo( 'name' )); ?></a></h2>
                 <?php }
                    if( get_theme_mod('vw_book_store_pro_display_tagline', true) != ''){
                      $description = get_bloginfo( 'description', 'display' );
                      if ( $description || is_customize_preview() ) : ?>
                 <p class="site-description">
                    <?php echo esc_html($description); ?>
                 </p>
                 <?php endif; }
                    ?>
              </div>
              <?php } else { ?>
              <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><img src="<?php echo get_stylesheet_directory_uri(); ?>/assets/images/cropped-footerlogo.png" alt="<?php bloginfo( 'name' ); ?>"/></a>
              <?php }?>
        </div>
        
    </div>
      <div class="col-lg-9 col-md-8 col-sm-4 col-2 content_head_col">
        <div class="innermenubox ">
          <div class="toggle-nav mobile-menu">
            <div role="button" on="tap:sidebar1.toggle" tabindex="0" class="hamburger" id="open_nav"><span class="screen-reader-text"><?php echo esc_html( 'Menu', 'vw-book-store-pro' ); ?></span><i class="fas fa-bars"></i></div>
          </div>
          <div class="main-header">
            <div id="mySidenav" class="nav sidenav">
              <nav id="site-navigation" class="main-navigation">
                <?php 
                  wp_nav_menu( array( 
                    'theme_location' => 'primary',
                    'container_class' => 'menu clearfix' ,
                    'menu_class' => 'clearfix',
                    'items_wrap' => '<ul id="%1$s" class="%2$s mobile_nav">%3$s</ul>',
                    'fallback_cb' => 'wp_page_menu',
                  ) ); 
                ?>
              </nav><!-- #site-navigation -->
            </div>
          </div>
          <amp-sidebar id="sidebar1" layout="nodisplay" side="left">
            <div role="button" aria-label="close sidebar" on="tap:sidebar1.toggle" tabindex="0" class="close-sidebar closebtn mobile-menu" id="close_nav"><i class="fas fa-times"></i></div>
              <div id="mySidenav" class="nav sidenav">
                <nav id="site-navigation" class="main-navigation">
                  <?php 
                    wp_nav_menu( array( 
                      'theme_location' => 'primary',
                      'container_class' => 'menu clearfix' ,
                      'menu_class' => 'clearfix',
                      'items_wrap' => '<ul id="%1$s" class="%2$s mobile_nav">%3$s</ul>',
                      'fallback_cb' => 'wp_page_menu',
                    ) ); 
                  ?>
                </nav><!-- #site-navigation -->
              </div>
          </amp-sidebar>
          <?php if ( get_theme_mod('vw_book_store_pro_header_search_enable',true) ) { ?>
          <span class="search-icon">
            <i class="<?php echo esc_html(get_theme_mod('vw_book_store_pro_header_search_icon')); ?>"></i>
          </span>
          <div class="serach_outer">
            <div class="closepop"><i class="far fa-window-close"></i></div>
              <div class="serach_inner search_popup">
                <form role="search" method="get" class="search-form serach-page" action="<?php echo esc_url( home_url( '/' ) ); ?>">
                    <label>
                        <input type="search" class="search-field" placeholder="<?php echo esc_html(get_theme_mod('vw_book_store_pro_search_placeholder_text'));?>" value="<?php echo esc_attr(the_search_query()); ?>" name="s">
                    </label>
                    <button type="submit" class="search-submit">
                      <i class="fas fa-search"></i>
                    </button>
                </form>
              </div>
          </div>
        <?php } ?>
          <div class="clearfix"></div>
        </div>
      </div>
    </div>
  </div>

</div>
 <span class="d-none" id="menu-width"><?php echo esc_html($menu_width); ?></span>