<?php
/**
 * Displays main header
 *
 * @package Corporate Office
 */
?>
<?php
$corporate_office_sticky_header = get_theme_mod('corporate_office_sticky_header');
    $corporate_office_data_sticky = "false";
    if ($corporate_office_sticky_header) {
    $corporate_office_data_sticky = "true";
    }
?>
<div class="main-header text-center text-md-start" data-sticky="<?php echo esc_attr($corporate_office_data_sticky); ?>">
    <div class="container-fluid px-5">
        <div class="row">
            <div class="col-lg-3 col-md-3 col-sm-5 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 $corporate_office_blog_info = get_bloginfo( 'name' ); ?>
                        <?php if ( ! empty( $corporate_office_blog_info ) ) : ?>
                            <?php if ( is_front_page() && is_home() ) : ?>
                                <?php if( get_theme_mod('corporate_office_logo_title_text',true) != ''){ ?>
                                    <h1 class="site-title pt-2"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                                <?php } ?>
                            <?php else : ?>
                                <?php if( get_theme_mod('corporate_office_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
                            $corporate_office_description = get_bloginfo( 'description', 'display' );
                            if ( $corporate_office_description || is_customize_preview() ) :
                        ?>
                        <?php if( get_theme_mod('corporate_office_theme_description',false) != ''){ ?>
                            <p class="site-description pb-2"><?php echo esc_html($corporate_office_description); ?></p>
                        <?php } ?>
                    <?php endif; ?>
                </div>
            </div>
            <div class="col-lg-7 col-md-4 col-sm-5 col-12 align-self-center header-box">
                <?php get_template_part('template-parts/navigation/nav'); ?>
            </div>
            <div class="col-lg-2 col-md-5 col-sm-2 col-12 align-self-center text-lg-end text-md-end header-right">
                <div class="social-link">
                    <?php if(get_theme_mod('corporate_office_facebook_url') != ''){ ?>
                        <a href="<?php echo esc_url(get_theme_mod('corporate_office_facebook_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('corporate_office_facebook_icon') ); ?>"></i></a>
                    <?php }?>
                    <?php if(get_theme_mod('corporate_office_twitter_url') != ''){ ?>
                        <a href="<?php echo esc_url(get_theme_mod('corporate_office_twitter_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('corporate_office_twitter_icon') ); ?>"></i></a>
                    <?php }?>
                    <?php if(get_theme_mod('corporate_office_intagram_url') != ''){ ?>
                        <a href="<?php echo esc_url(get_theme_mod('corporate_office_intagram_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('corporate_office_intagram_icon') ); ?>"></i></a>
                    <?php }?>
                    <?php if(get_theme_mod('corporate_office_linkedin_url') != ''){ ?>
                        <a href="<?php echo esc_url(get_theme_mod('corporate_office_linkedin_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('corporate_office_linkedin_icon') ); ?>"></i></a>
                    <?php }?>
                    <?php if(get_theme_mod('corporate_office_pintrest_url') != ''){ ?>
                        <a href="<?php echo esc_url(get_theme_mod('corporate_office_pintrest_url','')); ?>"><i class="<?php echo esc_attr( get_theme_mod('corporate_office_pintrest_icon') ); ?>"></i></a>
                    <?php }?>
                </div>
            </div>
        </div>
    </div>
</div>
