<?php
/**
 * Displays main header
 *
 * @package Event Dining Catering
 */
?>

<?php
$event_dining_catering_sticky_header = get_theme_mod('event_dining_catering_sticky_header');
    $event_dining_catering_data_sticky = "false";
    if ($event_dining_catering_sticky_header) {
    $event_dining_catering_data_sticky = "true";
    }
?>
<div class="main-header" data-sticky="<?php echo esc_attr($event_dining_catering_data_sticky); ?>">
    <div class="container">
        <div class="row">
            <div class="col-lg-3 col-md-4 align-self-center">
                <div class="navbar-logo text-md-start text-center">
                    <?php if ( has_custom_logo() ) : ?>
                        <div class="site-logo"><?php the_custom_logo(); ?></div>
                    <?php endif; ?>
                    <?php $event_dining_catering_blog_info = get_bloginfo( 'name' ); ?>
                        <?php if ( ! empty( $event_dining_catering_blog_info ) ) : ?>
                            <?php if ( is_front_page() && is_home() ) : ?>
                                <?php if( get_theme_mod('event_dining_catering_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('event_dining_catering_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
                            $event_dining_catering_description = get_bloginfo( 'description', 'display' );
                            if ( $event_dining_catering_description || is_customize_preview() ) :
                        ?>
                        <?php if( get_theme_mod('event_dining_catering_theme_description',false) != ''){ ?>
                            <p class="site-description pb-2"><?php echo esc_html($event_dining_catering_description); ?></p>
                        <?php } ?>
                    <?php endif; ?>
                </div>
            </div>
            <div class="col-lg-5 col-md-2 align-self-center text-md-start text-center">
                <?php get_template_part('template-parts/navigation/nav'); ?>
            </div>
            <div class="col-lg-4 col-md-6 header-btn align-self-center d-flex justify-content-md-end justify-content-center ps-0">
                <?php if(get_theme_mod('event_dining_catering_phone_number') != '') {?>
                    <a href="tel:<?php echo esc_attr(get_theme_mod('event_dining_catering_phone_number')); ?>" class="call-btn"><i class="fas fa-tty me-2"></i><span><?php echo esc_html(get_theme_mod('event_dining_catering_phone_number')); ?></span></a>
                <?php }?>
                <?php if(get_theme_mod('event_dining_catering_quote_btn_text') != '' || get_theme_mod('event_dining_catering_quote_btn_url') != '') {?>
                    <a href="<?php echo esc_url(get_theme_mod('event_dining_catering_quote_btn_url')); ?>" class="request-btn"><?php echo esc_html(get_theme_mod('event_dining_catering_quote_btn_text')); ?></a>
                <?php }?>
            </div>
        </div>
    </div>
</div>
