<?php
/**
 * The template part for top header
 *
 * @package VW Maintenance Services 
 * @subpackage vw_maintenance_services
 * @since VW Maintenance Services 1.0
 */
?>
<?php if (get_theme_mod('vw_maintenance_services_hide_show_topbar_section', true) == 1 || get_theme_mod( 'vw_maintenance_services_resp_topbar_hide_show', true) == 1) {  ?>
  <div id="topbar">
    <div class="container">
      <div class="row m-0">
        <div class="col-lg-3 col-md-12 align-self-center">
          <div class="logo">
            <?php if ( has_custom_logo() ) : ?>
              <div class="site-logo"><?php the_custom_logo(); ?></div>
            <?php endif; ?>
            <?php $blog_info = get_bloginfo( 'name' ); ?>
              <?php if ( ! empty( $blog_info ) ) : ?>
                <?php if ( is_front_page() && is_home() ) : ?>
                  <?php if( get_theme_mod('vw_maintenance_services_logo_title_hide_show',true) == 1){ ?>
                    <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                  <?php } ?>
                <?php else : ?>
                  <?php if( get_theme_mod('vw_maintenance_services_logo_title_hide_show',true) == 1){ ?>
                    <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                  <?php } ?>
                <?php endif; ?>
              <?php endif; ?>
              <?php
                $description = get_bloginfo( 'description', 'display' );
                if ( $description || is_customize_preview() ) :
              ?>
              <?php if( get_theme_mod('vw_maintenance_services_tagline_hide_show',false) == 1){ ?>
                <p class="site-description">
                  <?php echo esc_html($description); ?>
                </p>
              <?php } ?>
            <?php endif; ?>
          </div>
        </div>
        <div class="col-lg-5 col-md-6 align-self-center">
          <?php if (is_active_sidebar('social-links')) : ?>
            <?php dynamic_sidebar('social-links'); ?>
          <?php else : ?>
              <!-- Default Social Icons Widgets -->
                <div class="widget">
                    <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://twitter.com" target="_blank"><i class="fab fa-twitter"></i></a></li> 
                      <li><a href="https://instagram.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://youtube.com" target="_blank"><i class="fab fa-youtube"></i></a></li>
                    </ul>
                </div>
          <?php endif; ?>  
        </div>
        <div class="col-lg-3 col-md-5 align-self-center">
          <?php if( get_theme_mod( 'vw_maintenance_services_header_call_text') != '' | get_theme_mod( 'vw_maintenance_services_header_call') != '') { ?>
            <p class="call-text"><i class="<?php echo esc_attr(get_theme_mod('vw_maintenance_services_phone_no_icon','fas fa-phone')); ?>"></i><?php echo esc_html(get_theme_mod('vw_maintenance_services_header_call_text',''));?></p>
            <p class="call-no"><a href="tel:<?php echo esc_attr( get_theme_mod('vw_maintenance_services_header_call','') ); ?>"><?php echo esc_html(get_theme_mod('vw_maintenance_services_header_call',''));?></a></p>
          <?php }?>        
        </div>
        <div class="col-lg-1 col-md-1 align-self-center">
          <?php if( get_theme_mod( 'vw_maintenance_services_search_hide_show',true) == 1) { ?>
            <div class="search-box">
              <span><a href="#"><i class="<?php echo esc_attr(get_theme_mod('vw_maintenance_services_search_icon','fas fa-search')); ?>"></i></a></span>
            </div>
          <?php }?>
        </div>
      </div>
      <div class="serach_outer">
        <div class="closepop"><a href="#maincontent"><i class="<?php echo esc_attr(get_theme_mod('vw_maintenance_services_search_close_icon','fa fa-window-close')); ?>"></i></a></div>
        <div class="serach_inner">
          <?php get_search_form(); ?>
        </div>
      </div>
    </div>
  </div>
<?php }?>  