<?php
/**
 * Displays main header
 *
 * @package Eauto Repair
 */
?>
<?php
$eauto_repair_sticky_header = get_theme_mod('eauto_repair_sticky_header');
    $eauto_repair_data_sticky = "false";
    if ($eauto_repair_sticky_header) {
    $eauto_repair_data_sticky = "true";
    }
?>
<div class="main-header" data-sticky="<?php echo esc_attr($eauto_repair_data_sticky); ?>">
    <div class="container">
        <div class="header-content">
            <div class="row">
                <div class="col-lg-2 col-md-3 align-self-center pe-md-0">
                    <div class="navbar-logo text-center">
                        <?php if ( has_custom_logo() ) : ?>
                            <div class="site-logo"><?php the_custom_logo(); ?></div>
                        <?php endif; ?>
                        <?php $eauto_repair_blog_info = get_bloginfo( 'name' ); ?>
                            <?php if ( ! empty( $eauto_repair_blog_info ) ) : ?>
                                <?php if ( is_front_page() && is_home() ) : ?>
                                    <?php if( get_theme_mod('eauto_repair_logo_title_text',true) != ''){ ?>
                                        <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                                    <?php } ?>
                                <?php else : ?>
                                    <?php if( get_theme_mod('eauto_repair_logo_title_text',true) != ''){ ?>
                                        <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
                                $eauto_repair_description = get_bloginfo( 'description', 'display' );
                                if ( $eauto_repair_description || is_customize_preview() ) :
                            ?>
                            <?php if( get_theme_mod('eauto_repair_theme_description',false) != ''){ ?>
                                <p class="site-description pb-2"><?php echo esc_html($eauto_repair_description); ?></p>
                            <?php } ?>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="col-lg-7 col-md-4 align-self-center text-md-start text-center">
                    <?php get_template_part('template-parts/navigation/nav'); ?>
                </div>
                <div class="col-lg-3 col-md-5 align-self-center ps-md-0">
                    <div class="phone text-md-end text-center">
                        <div class="row m-0">
                            <div class="col-xl-10 col-lg-9 col-md-9 align-self-center ps-md-0">
                                <?php if(get_theme_mod('eauto_repair_phone_text') != '') {?>
                                    <p><?php echo esc_html(get_theme_mod('eauto_repair_phone_text')); ?></p>
                                <?php }?>
                                <?php if(get_theme_mod('eauto_repair_phone_number') != '') {?>
                                    <a href="tel:<?php echo esc_attr(get_theme_mod('eauto_repair_phone_number')); ?>" class="call-btn"><?php echo esc_html(get_theme_mod('eauto_repair_phone_number')); ?></a>
                                <?php }?>
                            </div>
                            <?php if(get_theme_mod('eauto_repair_phone_text') != '' || get_theme_mod('eauto_repair_phone_number') != '') {?>
                                <div class="col-xl-2 col-lg-3 col-md-3 align-self-center text-center">
                                    <i class="fas fa-phone"></i>
                                </div>
                            <?php }?>
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
</div>
