<?php
/**
 * The template part for topbar
 *
 * @package VW Parallax 
 * @subpackage vw_parallax
 * @since VW Parallax 1.0
 */
?>
<?php
  $vw_parallax_search_hide_show = get_theme_mod( 'vw_parallax_search_hide_show' );
  if ( 'Disable' == $vw_parallax_search_hide_show ) {
   $colmd = 'col-lg-12 col-md-12';
  } else { 
   $colmd = 'col-lg-11 col-md-5 col-6';
  } 
?>


<div class="row">
    <div class="col-lg-3 col-md-3 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_parallax_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_parallax_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_parallax_tagline_hide_show',false) == 1){ ?>
                <p class="site-description">
                  <?php echo esc_html($description); ?>
                </p>
              <?php } ?>
            <?php endif; ?>
        </div>
    </div>

    <div class="col-lg-9 col-md-9 align-self-center">
        <?php if (get_theme_mod('vw_parallax_hide_show_topbar_section', true) == 1 || get_theme_mod( 'vw_parallax_resp_topbar_hide_show', true) == 1) {  ?>
            <div class="topbar" class="col-md-12 col-lg-9">
                <div class="row">
                    <div class="col-lg-3 col-md-6">
                        <?php if(get_theme_mod('vw_parallax_phone') != ''){ ?>
                            <i class="<?php echo esc_attr(get_theme_mod('vw_parallax_phone_icon','fas fa-phone')); ?>"></i><span><a href="tel:<?php echo esc_attr( get_theme_mod('vw_parallax_phone','') ); ?>"><?php echo esc_html(get_theme_mod('vw_parallax_phone',''));?></a></span>
                        <?php }?>
                    </div>
                    <div class="col-lg-3 col-md-6">
                        <?php if(get_theme_mod('vw_parallax_email_address') != ''){ ?>
                            <i class="<?php echo esc_attr(get_theme_mod('vw_parallax_email_icon','fas fa-envelope-open')); ?>"></i><span><a href="mailto:<?php echo esc_attr(get_theme_mod('vw_parallax_email_address',''));?>"><?php echo esc_html(get_theme_mod('vw_parallax_email_address',''));?></a></span>
                        <?php }?>
                    </div>
                    <div class="col-lg-3 col-md-6">
                        <?php if(get_theme_mod('vw_parallax_timming') != ''){ ?>
                            <i class="<?php echo esc_attr(get_theme_mod('vw_parallax_timing_icon','far fa-clock')); ?>"></i><span><?php echo esc_html(get_theme_mod('vw_parallax_timming',''));?></span>
                        <?php }?>
                    </div>
                    <div class="col-lg-3 col-md-6">
                        <?php if (is_active_sidebar('social-widget')) : ?>
                            <?php dynamic_sidebar('social-widget'); ?>
                        <?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://youtube.com" target="_blank"><i class="fab fa-youtube"></i></a></li>
                                    <li><a href="https://google.com" target="_blank"><i class="fab fa-google"></i></a></li>
                                    <li><a href="https://linkedin.com" target="_blank"><i class="fab fa-linkedin"></i></a></li>                                                          
                                  </ul>
                              </div>
                        <?php endif; ?> 
                    </div>
                </div>
            </div>
        <?php }?>    
        <div class="header-menu <?php if( get_theme_mod( 'vw_parallax_sticky_header', false) == 1 || get_theme_mod( 'vw_parallax_stickyheader_hide_show', false) == 1) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
            <div class="row">
              <div class="<?php echo esc_html( $colmd ); ?> align-self-center">
                <?php get_template_part( 'template-parts/header/navigation' ); ?>
              </div>
              <?php if ( 'Disable' != $vw_parallax_search_hide_show ) {?>
                <div class="col-lg-1 col-md-2 col-6 align-self-center">
                  <div class="search-box">
                    <span><a href="#"><i class="<?php echo esc_attr(get_theme_mod('vw_parallax_search_icon','fas fa-search')); ?>"></i></a></span>
                  </div>
                </div>
              <?php } ?>
            </div>
        </div>
        <div class="serach_outer">
            <div class="closepop"><a href="#maincontent"><i class="<?php echo esc_attr(get_theme_mod('vw_parallax_search_close_icon','fa fa-window-close')); ?>"></i></a></div>
            <div class="serach_inner">
              <?php get_search_form(); ?>
            </div>
        </div>
    </div>
</div>