<?php 
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Probizz
 */
?>
<!Doctype html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php wp_head(); ?>
</head>

<body <?php body_class(); ?> >
    <!--header-part-->
    <header class="home_hader">
        <?php if( get_theme_mod( 'contact_home' )==1 ) : ?>
        <div class="header-topbar">
            <div class=" container head-cont">
                <div class=" row head_topbar-row animate fadeInLeft" data-anim-type="fadeInLeft" data-anim-delay="400">
                    <div class="col-md-10">
                        <div class="row">
                            <div class="col-md-4">
                                <?php if ( get_theme_mod( 'nineteen_contact_number' ) ) : ?>
                                    <div class="info_header-box text-left">
                                    <i class="fa fa-phone"> </i>
                                    <span><?php echo esc_html( get_theme_mod( 'nineteen_contact_number' ) ); ?></span>
                                </div>
                                <?php endif; ?>                                
                            </div>
                            <?php if ( get_theme_mod( 'nineteen_contact_email' ) ) : ?>
                            <div class="col-md-4">
                                <div class="info_header-box">
                                    <i class="far fa-envelope"></i>
                                    <span> <?php echo esc_html( get_theme_mod( 'nineteen_contact_email' ) ); ?> </span>
                                </div>
                            </div>
                            <?php endif; ?>
                            <?php if ( get_theme_mod( 'nineteen_contact_address' ) ) : ?>
                            <div class=" col-md-4 ">
                                <div class="info_header-box text-right">

                                    <i class="fa fa-map-marker icon"></i>
                                    <span> <?php echo esc_html( get_theme_mod( 'nineteen_contact_address' ) ); ?></span>
                                </div>
                            </div>
                            <?php endif; ?>
                        </div>
                    </div>                    
                </div>
            </div>
        </div>
    <?php endif; ?>

        <!--navbar-->
        <nav class="navbar navbar-expand-sm animate" data-anim-type="fadeInLeft" data-anim-delay="400">
            <div class="container navbar-containernt">
                <!-- Brand -->
                <?php $custom_logo_id= get_theme_mod( 'custom_logo' );
                  $logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
                  if( function_exists( 'has_custom_logo' ) ) :
                    if( has_custom_logo() ) : ?>
            <a class="navbar-brand" href="<?php echo esc_url( home_url() ); ?>"> <img src=" <?php echo esc_url( $logo[0] ); ?> " alt="<?php echo esc_html( get_bloginfo( 'name' ) ); ?>"class="img-fluid" style=" height: <?php echo esc_attr(get_theme_mod( 'nineteen_logo_heigth','70' )); ?>px;
                            width: <?php echo esc_attr(get_theme_mod( 'nineteen_logo_width','180' )); ?>px;" > </a>
            <?php    
                    else:  echo '<div><h1><a href="'.esc_url( home_url() ) .'" >'. esc_html( get_bloginfo( 'name' ) ) .'</a></h1>';
                           echo '<p>'. esc_html( get_bloginfo( 'description' ) ) .'</p></div>';
                    endif;
                  endif;  
                ?>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon fa fa-bars"> </span>
                </button>
                <!-- Links -->
                <div class="collapse navbar-collapse" id="navbarSupportedContent">
                    <?php 
                            wp_nav_menu( array(
                              'theme_location' => 'primary',
                              'menu_class'     => 'navbar-nav nav justify-content-center',
                              'container'      => false,
                              'menu_id'        => false,
                              'depth'          => 5,
                              'fallback_cb'    => 'wl_fallback_page_menu',
                              'walker'         => new probizz_nav_walker(),
                              )
                            );
                        ?>                   
                    <?php if ( wl_theme_is_companion_active() ) { 
                            if ( get_theme_mod( 'nineteen_search_box', '1' ) == "1" ) { 
                                get_template_part( 'searchform1' ); 
                            } 
                        } 
                    ?>
                </div>
            </div>
        </nav>
        <!--close-navbar-->
    </header>