<?php
/**
 * Displays main header
 *
 * @package Automobile Detailing Shop
 */
?>
<?php
$automobile_detailing_shop_sticky_header = get_theme_mod('automobile_detailing_shop_sticky_header');
    $automobile_detailing_shop_data_sticky = "false";
    if ($automobile_detailing_shop_sticky_header) {
    $automobile_detailing_shop_data_sticky = "true";
    }
?>
<div class="main-header py-4" data-sticky="<?php echo esc_attr($automobile_detailing_shop_data_sticky); ?>">
    <div class="container">
        <div class="header-content">
            <div class="row">
                <div class="col-lg-3 col-md-3 align-self-center pe-md-0">
                    <div class="navbar-logo text-left">
                        <?php if ( has_custom_logo() ) : ?>
                            <div class="site-logo"><?php the_custom_logo(); ?></div>
                        <?php endif; ?>
                        <?php $automobile_detailing_shop_blog_info = get_bloginfo( 'name' ); ?>
                            <?php if ( ! empty( $automobile_detailing_shop_blog_info ) ) : ?>
                                <?php if ( is_front_page() && is_home() ) : ?>
                                    <?php if( get_theme_mod('automobile_detailing_shop_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('automobile_detailing_shop_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
                                $automobile_detailing_shop_description = get_bloginfo( 'description', 'display' );
                                if ( $automobile_detailing_shop_description || is_customize_preview() ) :
                            ?>
                            <?php if( get_theme_mod('automobile_detailing_shop_theme_description',false) != ''){ ?>
                                <p class="site-description pb-2"><?php echo esc_html($automobile_detailing_shop_description); ?></p>
                            <?php } ?>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="col-lg-6 col-md-4 align-self-center text-lg-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 header-btn text-end">
                    <?php if ( get_theme_mod('automobile_detailing_shop_header_button_url') != "" || get_theme_mod('automobile_detailing_shop_header_button_text') != "" ) {?>
                        <span class="header-button ms-3">
                            <a href="<?php esc_url(get_theme_mod('automobile_detailing_shop_header_button_url')); ?>"><?php echo esc_html(get_theme_mod('automobile_detailing_shop_header_button_text')); ?></a>
                        </span>
                    <?php }?>
                </div>
            </div>
        </div>
    </div>
</div>
