<?php
/**
 * The template part for Top Header
 *
 * @package VW Modern Kitchen 
 * @subpackage vw-modern-kitchen
 * @since vw-modern-kitchen 1.0
 */
?>

<div class="main-header <?php if( get_theme_mod( 'vw_modern_kitchen_sticky_header', false) == 1 || get_theme_mod( 'vw_modern_kitchen_stickyheader_hide_show', false) == 1) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
  <?php if (get_theme_mod('vw_modern_kitchen_topbar_hide_show', false)){ ?>
    <div class="contact-info py-2">
      <div class="container">
        <div class="row">
          <div class="col-xxl-2 col-xl-2 col-lg-2 col-md-6 col-sm-12 col-12 align-self-center topbar-phone text-lg-start text-md-start text-center">
            <?php if(get_theme_mod('vw_modern_kitchen_topbar_phone_number') != ''){ ?>
              <div class="phone-box mb-lg-0 mb-md-3 mb-3">
                <a href="tel:<?php echo esc_attr( get_theme_mod('vw_modern_kitchen_topbar_phone_number') ); ?>"><i class="<?php echo esc_attr( get_theme_mod('vw_modern_kitchen_topbar_phone_icon', 'fa-solid fa-phone') ); ?> me-2"></i><?php echo esc_html( get_theme_mod('vw_modern_kitchen_topbar_phone_number') ); ?>
                </a>
              </div>
            <?php } ?>
          </div>
          <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-6 col-sm-12 col-12 align-self-center top-mail text-lg-start text-md-end text-center">
            <?php if(get_theme_mod('vw_modern_kitchen_top_email_address') != ''){ ?>
              <div class="mail-box mb-lg-0 mb-md-3 mb-3">
                <a href="mailto:<?php echo esc_attr(get_theme_mod('vw_modern_kitchen_top_email_address'));?>"><i class="<?php echo esc_attr(get_theme_mod('vw_modern_kitchen_top_email_address_icon','fa-regular fa-envelope')); ?> me-2"></i><span><?php echo esc_html(get_theme_mod('vw_modern_kitchen_top_email_address'));?></span></a>
              </div>
            <?php } ?>
          </div>
          <div class="col-xxl-5 col-xl-5 col-lg-5 col-md-12 col-sm-12 col-12 align-self-center announce-text text-lg-start text-md-center text-center">
            <?php if(get_theme_mod('vw_modern_kitchen_topbar_announce_text') != ''){ ?>
              <p class="mb-lg-0 mb-md-3 mb-3 text-capitalize"><i class="<?php echo esc_attr( get_theme_mod('vw_modern_kitchen_topbar_announce_icon', 'fa-solid fa-bullhorn') ); ?> me-2"></i><?php echo esc_html( get_theme_mod('vw_modern_kitchen_topbar_announce_text') ); ?></p>
            <?php } ?>
          </div>
           <div class="col-xxl-2 col-xl-2 col-lg-2 col-md-12 col-sm-12 col-12 align-self-center banner-social-box">
              <?php if ( is_active_sidebar( 'social-widget-sidemenu' ) ) : ?>                
                <?php dynamic_sidebar('social-widget-sidemenu'); ?>
              <?php else : ?>
                <div class="widget">
                  <div class="custom-social-icons" >
                    <a href="https://facebook.com" target="_blank"><i class="fa-brands fa-facebook-f"></i></a>
                    <a href="https://instagram.com" target="_blank"><i class="fab fa-instagram"></i></a>    
                    <a href="https://twitter.com" target="_blank"><i class="fa-brands fa-x-twitter"></i></a>
                    <a href="https://youtube.com" target="_blank"><i class="fab fa-youtube"></i></a>  
                    <a href="https://pinterest.com" target="_blank"><i class="fab fa-pinterest"></i></a> 
                  </div>
                </div>
              <?php endif; ?>
            </div>
        </div>
      </div>
    </div>
  <?php }?>

  <div class="main-topbar py-4">
    <div class="container">
      <div class="row">
        <div class="col-xxl-2 col-xl-2 col-lg-3 col-md-6 col-sm-12 col-12 align-self-center header-left-box">
          <div class="logo-box pb-0 pb-md-0">
            <?php if ( has_custom_logo() ) : ?>
              <div class="site-logo"><?php the_custom_logo(); ?></div>
            <?php endif; ?>
            <?php $vw_modern_kitchen_blog_info = get_bloginfo( 'name' ); ?>
              <?php if ( ! empty( $vw_modern_kitchen_blog_info ) ) : ?>
                <?php if ( is_front_page() && is_home() ) : ?>
                  <?php if( get_theme_mod('vw_modern_kitchen_logo_title_hide_show',true) == 1){ ?>
                    <p class="site-title mb-0 text-lg-start text-md-start text-center"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                  <?php } ?>
                <?php else : ?>
                  <?php if( get_theme_mod('vw_modern_kitchen_logo_title_hide_show',true) == 1){ ?>
                    <p class="site-title mb-0 text-lg-start text-md-start text-center"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                  <?php } ?>
                <?php endif; ?>
              <?php endif; ?>
              <?php
                $vw_modern_kitchen_description = get_bloginfo( 'description', 'display' );
                if ( $vw_modern_kitchen_description || is_customize_preview() ) :
              ?>
              <?php if( get_theme_mod('vw_modern_kitchen_tagline_hide_show',false) == 1){ ?>
                <p class="site-description mb-0 text-start">
                  <?php echo esc_html($vw_modern_kitchen_description); ?>
                </p>
              <?php } ?>
            <?php endif; ?>
          </div>
        </div>
        <div class="col-xxl-10 col-xl-10 col-lg-9 col-md-6 col-sm-12 col-12 align-self-center header-right-box p-0">
          <div class="row">
            <div class="col-xxl-10 col-xl-9 col-lg-9 col-md-6 col-sm-12 col-12 align-self-center">
              <?php get_template_part('template-parts/header/navigation'); ?>
            </div>
            <div class="col-xxl-2 col-xl-3 col-lg-3 col-md-6 col-sm-12 col-12 align-self-center text-lg-end text-md-end text-center">
              <?php if ( get_theme_mod('vw_modern_kitchen_header_button_label') != '' || get_theme_mod('vw_modern_kitchen_header_button_url') != '') {?>
                <div class ="header-btn" data-wow-delay=".45s">
                  <a href="<?php echo esc_url(get_theme_mod('vw_modern_kitchen_header_button_url'));?>" class="text-capitalize justify-content-end d-inline-flex align-items-center gap-3"><?php echo esc_html(get_theme_mod('vw_modern_kitchen_header_button_label'));?><i class="fa-solid fa-arrow-right"></i>
                  </a>
                </div>
              <?php }?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>