<?php
/**
 * Header Layout
 * @package Omega Design Agency
 */

$omega_design_agency_default = omega_design_agency_get_default_theme_options();

$omega_design_agency_header_layout_button = esc_html( get_theme_mod( 'omega_design_agency_header_layout_button',
$omega_design_agency_default['omega_design_agency_header_layout_button'] ) );

$omega_design_agency_header_layout_button_url = esc_url( get_theme_mod( 'omega_design_agency_header_layout_button_url',
$omega_design_agency_default['omega_design_agency_header_layout_button_url'] ) );

$omega_design_agency_header_layout_button_1 = esc_html( get_theme_mod( 'omega_design_agency_header_layout_button_1',
$omega_design_agency_default['omega_design_agency_header_layout_button_1'] ) );

$omega_design_agency_header_layout_button_1_url = esc_url( get_theme_mod( 'omega_design_agency_header_layout_button_1_url',
$omega_design_agency_default['omega_design_agency_header_layout_button_1_url'] ) );

$omega_design_agency_sticky = get_theme_mod('omega_design_agency_sticky');
$omega_design_agency_data_sticky = "false";
if ($omega_design_agency_sticky) {
$omega_design_agency_data_sticky = "true";
}
global $wp_customize;

?>
<div class="main-header">
    <section id="middle-header" class="header-navbar <?php if( is_user_logged_in() && !isset( $wp_customize ) ){ echo "login-user";} ?>" data-sticky="<?php echo esc_attr($omega_design_agency_data_sticky); ?>">
        <div class="wrapper header-wrapper header-box">
            <div class="header-titles">
                <?php
                    omega_design_agency_site_logo();
                    omega_design_agency_site_description();
                ?>
            </div>
            <div class="theme-header-areas header-areas-right menu-box">
                <div class="site-navigation">
                    <nav class="primary-menu-wrapper" aria-label="<?php esc_attr_e('Horizontal', 'omega-design-agency'); ?>" role="navigation">
                        <ul class="primary-menu theme-menu">
                            <?php
                            if (has_nav_menu('omega-design-agency-primary-menu')) {
                                wp_nav_menu(
                                    array(
                                        'container' => '',
                                        'items_wrap' => '%3$s',
                                        'theme_location' => 'omega-design-agency-primary-menu',
                                    )
                                );
                            } else {
                                wp_list_pages(
                                    array(
                                        'match_menu_classes' => true,
                                        'show_sub_menu_icons' => true,
                                        'title_li' => false,
                                        'walker' => new Omega_Design_Agency_Walker_Page(),
                                    )
                                );
                            } ?>
                        </ul>
                    </nav>
                </div>
                <div class="navbar-controls twp-hide-js">
                    <button type="button" class="navbar-control navbar-control-offcanvas">
                        <span class="navbar-control-trigger" tabindex="-1">
                            <?php omega_design_agency_the_theme_svg('menu'); ?>
                        </span>
                    </button>
                </div>
            </div>
            <div class="theme-header-areas header-areas-right header-button">
                <?php if( $omega_design_agency_header_layout_button || $omega_design_agency_header_layout_button_url ){ ?>
                    <span>
                        <a href="<?php echo esc_url( $omega_design_agency_header_layout_button_url ); ?>"><?php echo esc_html( $omega_design_agency_header_layout_button ); ?></a>
                    </span>
                <?php } ?>
            </div>
            <div class="theme-header-areas header-areas-right header-button">
                <?php if( $omega_design_agency_header_layout_button_1 || $omega_design_agency_header_layout_button_1_url ){ ?>
                    <span>
                        <a class="button2" href="<?php echo esc_url( $omega_design_agency_header_layout_button_1_url ); ?>"><?php echo esc_html( $omega_design_agency_header_layout_button_1 ); ?></a>
                    </span>
                <?php } ?>
            </div>
        </div>
    </section>
</div>