<?php
/*
* Display Logo and contact details
*/
?>
<div class="main-header">
  <div class="headerbox">
    <?php if (get_theme_mod('air_condition_repair_topbar_visibility', true)) : ?>
      <div class="top-header">
        <div class="container">
          <div class="row">
            <div class="col-lg-7 col-md-7 col-12 align-self-center">
              <div class="left contact">
                  <?php if (get_theme_mod('air_condition_repair_mail')) : ?>
                    <span class="mb-md-0 mb-2 mt-md-0 mt-2 contact-content me-0">
                      <a href="mailto:<?php echo esc_attr(get_theme_mod('air_condition_repair_mail')); ?>">
                        <i class="fas fa-envelope me-1"></i>
                        <?php echo esc_html(get_theme_mod('air_condition_repair_mail')); ?>
                      </a>
                    </span>
                  <?php endif; ?>
                  <?php if (get_theme_mod('air_condition_repair_call')) : ?>
                    <span class="mb-md-0 mb-2 contact-content call ms-lg-5 ms-md-3 me-0">
                      <a href="tel:<?php echo esc_attr(get_theme_mod('air_condition_repair_call')); ?>">
                        <i class="fas fa-phone me-1"></i>
                        <?php echo esc_html(get_theme_mod('air_condition_repair_call')); ?>
                      </a>
                    </span>
                  <?php endif; ?>
                </div>
            </div>
            <div class="col-lg-5 col-md-5 col-12 social-box align-self-center">
              <div class="social-media">
                <?php
                  $air_condition_repair_fb_url = get_theme_mod('air_condition_repair_facebook_url');
                  $air_condition_repair_ins_url = get_theme_mod('air_condition_repair_instagram_url');
                  $air_condition_repair_google_plus_url = get_theme_mod('air_condition_repair_google_plus_url');
                  $air_condition_repair_twt_url = get_theme_mod('air_condition_repair_twitter_url');

                  $air_condition_repair_fb_new_tab = esc_attr(get_theme_mod('air_condition_repair_header_fb_new_tab', 'true'));
                  $air_condition_repair_ins_new_tab = esc_attr(get_theme_mod('air_condition_repair_header_ins_new_tab', 'true'));
                  $air_condition_repair_google_plus_new_tab = esc_attr(get_theme_mod('air_condition_repair_google_plus_new_tab', 'true'));
                  $air_condition_repair_twt_new_tab = esc_attr(get_theme_mod('air_condition_repair_header_twt_new_tab', 'true'));

                  if ($air_condition_repair_twt_url || $air_condition_repair_fb_url || $air_condition_repair_ins_url || $air_condition_repair_google_plus_url) : ?>
                    <div class="icon-social">
                      <?php if ($air_condition_repair_fb_url) : ?>
                          <a <?php if ($air_condition_repair_fb_new_tab != false) : ?>target="_blank" <?php endif; ?>href="<?php echo esc_url($air_condition_repair_fb_url); ?>"><i class="<?php echo esc_attr(get_theme_mod('air_condition_repair_facebook_icon', 'fab fa-facebook-f')); ?>"></i></a>
                      <?php endif; ?>
                      <?php if ($air_condition_repair_twt_url) : ?>
                          <a <?php if ($air_condition_repair_twt_new_tab != false) : ?>target="_blank" <?php endif; ?>href="<?php echo esc_url($air_condition_repair_twt_url); ?>"><i class="ms-md-2 ms-3 <?php echo esc_attr(get_theme_mod('air_condition_repair_twitter_icon', 'fab fa-twitter')); ?>"></i></a>
                      <?php endif; ?>
                      <?php if ($air_condition_repair_google_plus_url) : ?>
                          <a <?php if ($air_condition_repair_google_plus_new_tab != false) : ?>target="_blank" <?php endif; ?>href="<?php echo esc_url($air_condition_repair_google_plus_url); ?>"><i class="ms-md-2 ms-3 ms-2 <?php echo esc_attr(get_theme_mod('air_condition_repair_google_plus_icon', 'fa-brands fa-google-plus-g')); ?>"></i></a>
                      <?php endif; ?>
                      <?php if ($air_condition_repair_ins_url) : ?>
                          <a <?php if ($air_condition_repair_ins_new_tab != false) : ?>target="_blank" <?php endif; ?>href="<?php echo esc_url($air_condition_repair_ins_url); ?>"><i class="ms-md-2 ms-3 <?php echo esc_attr(get_theme_mod('air_condition_repair_instagram_icon', 'fab fa-instagram')); ?>"></i></a>
                      <?php endif; ?>
                  </div>
                <?php endif; ?>
              </div>
            </div>
          </div>
        </div>
      </div>
    <?php endif; ?>
    <div class="menubox py-md-2 py-3">
      <div class="container">
        <div class="row">
          <div class="col-lg-3 col-md-4 logo-col align-self-center">
            <div class="logo my-lg-2 my-3">
              <?php if( has_custom_logo() ) air_condition_repair_the_custom_logo(); ?>
              <?php if(get_theme_mod('air_condition_repair_site_title',true) == 1){ ?>
                <?php if (is_front_page() && is_home()) : ?>
                  <h1 class="text-capitalize">
                    <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
                  </h1> 
                <?php else : ?>
                  <p class="text-capitalize site-title mb-1">
                    <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
                  </p>
                <?php endif; ?>
              <?php }?>
              <?php $air_condition_repair_description = get_bloginfo( 'description', 'display' );
              if ( $air_condition_repair_description || is_customize_preview() ) : ?>
                <?php if(get_theme_mod('air_condition_repair_site_tagline',false)){ ?>
                  <p class="site-description mb-0"><?php echo esc_html($air_condition_repair_description); ?></p>
                <?php }?>
              <?php endif; ?>
            </div>
          </div>
          <div class="col-lg-6 col-md-4 align-self-center">
            <?php get_template_part('template-parts/navigation/site-nav'); ?>
          </div>
          <div class="col-lg-3 col-md-4 align-self-center">
            <div class="header-menu-right">
              <?php if (get_theme_mod('air_condition_repair_btn_call')) : ?>
                  <p class="btn-call my-0">
                    <a href="tel:<?php echo esc_attr(get_theme_mod('air_condition_repair_btn_call')); ?>">
                      <span class="text-uppercase"><?php echo esc_html__( 'Call Us: ', 'air-condition-repair' ); ?></span>
                      <?php echo esc_html(get_theme_mod('air_condition_repair_btn_call')); ?>
                    </a>
                  </p>
                <?php endif; ?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>