<?php
/**
 * The template part for Top Header
 *
 * @package AC Repairing Services 
 * @subpackage ac-repairing-services
 * @since ac-repairing-services 1.0
 */
?>

<div class="main-header">
  <div class="container main-top-bar">
    <div class="row">
      <div class="col-xl-11 col-lg-11 col-md-10 col-10 pt-lg-0 pt-md-3 pt-3 py-lg-0 py-md-3 py-0 main-top-bar-section">
        <div class="row topbar-background">
          <div class="col-lg-1 col-md-5 col-4 align-self-center logo-bg-bx">
            <div class="logo text-center text-md-start pb-0 pb-md-0">
              <?php if ( has_custom_logo() ) : ?>
                <div class="site-logo"><?php the_custom_logo(); ?></div>
              <?php endif; ?>
              <?php $ac_repairing_services_blog_info = get_bloginfo( 'name' ); ?>
                <?php if ( ! empty( $ac_repairing_services_blog_info ) ) : ?>
                  <?php if ( is_front_page() && is_home() ) : ?>
                    <?php if( get_theme_mod('ac_repairing_services_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('ac_repairing_services_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
                  $ac_repairing_services_description = get_bloginfo( 'description', 'display' );
                  if ( $ac_repairing_services_description || is_customize_preview() ) :
                ?>
                <?php if( get_theme_mod('ac_repairing_services_tagline_hide_show',false) == 1){ ?>
                  <p class="site-description mb-0">
                    <?php echo esc_html($ac_repairing_services_description); ?>
                  </p>
                <?php } ?>
              <?php endif; ?>
            </div>
          </div>
          <div class="col-lg-8 col-md-3 col-1 align-self-center">
            <?php get_template_part('template-parts/header/navigation'); ?>
          </div>
          <div class="col-lg-3 col-md-4 col-6 align-self-center py-lg-0 py-md-0 py-0 btn-column ">
            <div class="topbar_btn text-end">
              <?php if( get_theme_mod('ac_repairing_services_topbar_btn_link1') != '' || get_theme_mod('ac_repairing_services_topbar_btn_text') != '' ){ ?>
                <a href="<?php echo esc_url(get_theme_mod('ac_repairing_services_topbar_btn_link1',''));?>"><?php echo esc_html(get_theme_mod('ac_repairing_services_topbar_btn_text',''));?><i class="fas fa-long-arrow-alt-right ms-2"></i></a>
              <?php }?>
            </div>
          </div>
        </div>
      </div>
      <div class="col-xl-1 col-lg-1 col-md-2 col-2 align-self-center px-0 toggle-btn  py-lg-0 py-md-0 pb-0 pt-lg-0 pt-md-3 pt-3 py-lg-0 py-md-0 py-0">
        <a href="#" id="sidebar-pop"><i class="<?php echo esc_attr(get_theme_mod('ac_repairing_services_baropen_icon','media-box fa-solid fa-bars-staggered')); ?>"></i></a>
        <div class="header-sidebar">
          <div class="close-pop"><a href="#maincontent"><i class="<?php echo esc_attr(get_theme_mod('ac_repairing_services_barclose_icon','fas fa-window-close')); ?>"></i></a>
          </div>
          <div class="menu-drawer">
            <div class="logo">
              <?php if ( has_custom_logo() ) : ?>
                <div class="site-logo"><?php the_custom_logo(); ?></div>
                  <?php endif; ?>
                  <?php $ac_repairing_services_blog_info = get_bloginfo( 'name' ); ?>
                    <?php if ( ! empty( $ac_repairing_services_blog_info ) ) : ?>
                      <?php if ( is_front_page() && is_home() ) : ?>
                        <?php if( get_theme_mod('ac_repairing_services_logo_title_hide_show',true) == 1){ ?>
                          <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                        <?php } ?>
                      <?php else : ?>
                        <?php if( get_theme_mod('ac_repairing_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
                      $ac_repairing_services_description = get_bloginfo( 'description', 'display' );
                      if ( $ac_repairing_services_description || is_customize_preview() ) :
                    ?>
                    <?php if( get_theme_mod('ac_repairing_services_tagline_hide_show',false) == 1){ ?>
                      <p class="site-description mb-0">
                        <?php echo esc_html($ac_repairing_services_description); ?>
                      </p>
                    <?php } ?>
                <?php endif; ?>
            </div>
            <?php if(get_theme_mod('ac_repairing_services_openclose_text') != '') {?>
              <p class="mt-3"><?php echo esc_html(get_theme_mod('ac_repairing_services_openclose_text')) ?></p>
            <?php }?>
            <?php if( get_theme_mod( 'ac_repairing_services_phone_no_icon') != '' || get_theme_mod( 'ac_repairing_services_phone_number') != '') { ?>
              <div class="phone py-4">
                <i class="<?php echo esc_attr(get_theme_mod('ac_repairing_services_phone_no_icon','fa-solid fa-headset')); ?>"></i>
                <p><a href="tel:<?php echo esc_attr( get_theme_mod('ac_repairing_services_phone_number','') ); ?>"><?php echo esc_html(get_theme_mod('ac_repairing_services_phone_number',''));?></a></p>
              </div>
            <?php }?>
                <?php if( get_theme_mod( 'ac_repairing_services_email_address_icon') != '' || get_theme_mod( 'ac_repairing_services_email_address') != '') { ?>
                  <div class="envelope ">
                      <i class="<?php echo esc_attr(get_theme_mod('ac_repairing_services_email_address_icon','fa-solid fa-envelope-open-text')); ?>"></i>
                      <p><a href="mailto:<?php echo esc_attr(get_theme_mod('ac_repairing_services_email_address',''));?>"><?php echo esc_html(get_theme_mod('ac_repairing_services_email_address',''));?><span class="screen-reader-text"><?php esc_html_e( 'example@gmail.com','ac-repairing-services' );?></span></a></p>
                  </div>
                <?php }?>
            <div class="topbar-social-icon mt-2 mt-lg-0 mt-md-0">
              <?php dynamic_sidebar('social-widget-sidemenu'); ?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>