<?php
/**
 * The template part for Middle Header
 *
 * @package Catering Services
 * @subpackage catering-services
 * @since catering-services 1.0
 */
?>
<?php
  $catering_services_search_hide_show = get_theme_mod( 'catering_services_search_hide_show' );
  if ( 'Disable' == $catering_services_search_hide_show ) {
   $colmd = 'col-lg-12 col-md-12';
  } else { 
   $colmd = 'col-lg-8 col-md-6 col-6';
  }
?>
  <div id="topbar" class="topbar">
    <div class="container">
      <div class="box-header <?php if( get_theme_mod( 'catering_services_sticky_header', false) == 1 || get_theme_mod( 'catering_services_stickyheader_hide_show', false) == 1) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
        <div class="row">
          <div class="col-lg-2 col-md-4 col-12 align-self-center text-center position-relative">
            <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('catering_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('catering_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
                  $description = get_bloginfo( 'description', 'display' );
                  if ( $description || is_customize_preview() ) :
                ?>
                <?php if( get_theme_mod('catering_services_tagline_hide_show',false) == 1){ ?>
                  <p class="site-description mb-0">
                    <?php echo esc_html($description); ?>
                  </p>
                <?php } ?>
              <?php endif; ?>
            </div>
          </div>
          <div class="col-lg-9 col-md-6 col-6 align-self-center">
            <div class="header-menu">
              <?php get_template_part('template-parts/header/navigation'); ?>
            </div>
          </div>
          <div class="col-lg-1 col-md-2 col-6 align-self-center">
           <?php if( get_theme_mod( 'catering_services_search_hide_show1', true) == 1) { ?>
              <div class="search-box text-lg-end text-md-end text-center">
                <a href="#" class="search-open"><i class="<?php echo esc_attr(get_theme_mod('catering_services_searchopen_topbar_section','fas fa-search')); ?>"></i></a>
              </div>
              <div class="serach_outer">
                <div class="closepop"><a href="#sidebar-pop"><i class="<?php echo esc_attr(get_theme_mod('catering_services_searchclose_topbar_section','fas fa-window-close')); ?>"></i></a></div>
                <div class="serach_inner">
                  <?php get_search_form(); ?>
                </div>
              </div>
            <?php }?>
          </div>
        </div>
      </div>
    </div>
  </div>