<?php
/**
 * Displays main header nav bar
 *
 * @package Electronics Equipment
 */
?>

<div class="main-header text-center text-md-start">
    <div class="container">
        <div class="row nav-box">
            <div class="col-xl-2 col-lg-1 col-md-4 col-sm-5 col-6 logo-box align-self-center">
                <?php if (get_theme_mod('electronics_equipment_header_sidebar_setting', false) != '') { ?>
                    <div class="bar-icon">
                        <button onclick="electronics_equipment_openSidebar()"><i class="fas fa-bars"></i></button>
                        <div class="header-widgets">
                            <a href="javascript:void(0)" class="closebtnn" onclick="electronics_equipment_closeSidebar()"><i class="fa-solid fa-times"></i></a>
                            <div class="sidebar">
                                <?php if( is_active_sidebar('header-sidebar') ) : ?>
                                    <?php dynamic_sidebar( 'header-sidebar' );?>
                                <?php else : ?>
                                    <h4><?php esc_html_e('Add Widgets Here.', 'electronics-equipment'); ?></h4>
                                <?php endif;?>
                            </div>
                        </div>
                    </div>
                <?php }?>
            </div>
            <div class="col-xl-8 col-lg-9 col-md-3 col-sm-2 col-6 align-self-center header-box">
                <?php get_template_part('template-parts/navigation/nav'); ?>
            </div>
            <div class="col-xl-2 col-lg-2 col-md-5 col-sm-4 col-12 align-self-center header-right-box">
                <?php if ( get_theme_mod('electronics_equipment_header_button_url') != '' || get_theme_mod('electronics_equipment_header_button_text') != '' ) { ?>
                    <a class="head-button" href="<?php echo esc_url( get_theme_mod('electronics_equipment_header_button_url') ); ?>"><?php echo esc_html( get_theme_mod('electronics_equipment_header_button_text') ); ?></a>
                <?php } ?>
            </div>
        </div>
    </div>
</div>
