<?php
/**
 * Displays main header
 *
 * @package Indoor Sports Zone
 */
?>
<?php
$indoor_sports_zone_sticky_header = get_theme_mod('indoor_sports_zone_sticky_header');
    $indoor_sports_zone_data_sticky = "false";
    if ($indoor_sports_zone_sticky_header) {
    $indoor_sports_zone_data_sticky = "true";
    }
?>
<div class="main-header text-center text-md-left" data-sticky="<?php echo esc_attr($indoor_sports_zone_data_sticky); ?>">
    <div class="container-fluid px-5">
        <div class="row m-0">
            <div class="col-lg-3 col-md-4 col-sm-12 col-12 logo-box align-self-center">
                <div class="navbar-brand ">
                    <?php if ( has_custom_logo() ) : ?>
                        <div class="site-logo"><?php the_custom_logo(); ?></div>
                    <?php endif; ?>
                    <?php $indoor_sports_zone_blog_info = get_bloginfo( 'name' ); ?>
                        <?php if ( ! empty( $indoor_sports_zone_blog_info ) ) : ?>
                            <?php if ( is_front_page() && is_home() ) : ?>
                                <?php if( get_theme_mod('indoor_sports_zone_logo_title_text',true) != ''){ ?>
                                    <h1 class="site-title py-2"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                                <?php } ?>
                            <?php else : ?>
                                <?php if( get_theme_mod('indoor_sports_zone_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
                            $indoor_sports_zone_description = get_bloginfo( 'description', 'display' );
                            if ( $indoor_sports_zone_description || is_customize_preview() ) :
                        ?>
                        <?php if( get_theme_mod('indoor_sports_zone_theme_description',false) != ''){ ?>
                            <p class="site-description pb-2"><?php echo esc_html($indoor_sports_zone_description); ?></p>
                        <?php } ?>
                    <?php endif; ?>
                </div>
            </div>
            <div class="col-lg-6 col-md-4 col-sm-3 col-4 align-self-center">
                <div class="header-box">
                    <?php get_template_part('template-parts/navigation/nav'); ?>
                </div>
            </div>
            <div class="col-lg-3 col-md-4 col-sm-6 col-8 align-self-center header-btn text-end text-sm-center pe-0">
                <?php if(get_theme_mod('indoor_sports_zone_header_button_url') != '' || get_theme_mod('indoor_sports_zone_header_button_text') != ''){ ?>
                    <div class="head-btn">
                        <a href="<?php echo esc_url(get_theme_mod('indoor_sports_zone_header_button_url')); ?>"><?php echo esc_html(get_theme_mod('indoor_sports_zone_header_button_text')); ?></a>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
</div>
