<?php
    // Settings
    $show_subheader = OhioSettings::subheader_is_displayed();
    $mobile_search_visibility = OhioOptions::get( 'page_mobile_search_visibility', true );
    $mobile_hamburger_position = OhioOptions::get_global( 'page_header_mobile_menu_position', 'left' );
    $menu_type = OhioOptions::get( 'page_header_menu_type', 'full' );
    $header_dynamic_typo = OhioOptions::get( 'page_header_dynamic_typography_color', false );
    $header_fixed = OhioOptions::get( 'page_header_fixed_position', false );

    $header_classes = '';
    if ( $header_fixed ) { 
        $header_classes .= ' -fixed'; 
    }
    if ( $show_subheader ) {
        $header_classes .= ' subheader_included';
    }
    if ( ! $mobile_search_visibility ) {
        $header_classes .= ' without-mobile-search';
    }
    $header_classes .= ' mobile-hamburger-position-' . $mobile_hamburger_position .' hamburger-position-left';
    if ( $menu_type == 'both' ) {
        $header_classes .= ' both-types';
    }

    $dynamic_typo_class = '';
    if ( $header_dynamic_typo ) {
        $dynamic_typo_class = ' header-dynamic-typo';
    }
?>

<header id="masthead" class="header header-sidebar header-7<?php echo esc_attr( $header_classes ); ?>">
    <div class="header-wrap">
        <div class="header-wrap-inner vertical-inner">
            <div class="top-part<?php echo esc_attr( $dynamic_typo_class ); ?>">
                <div class="top-part-inner">
                    <?php get_template_part( 'parts/elements/menu_nav' ); ?>
                    <?php get_template_part( 'parts/elements/menu_logo' ); ?>
                </div>
            </div>
            <div class="middle-part<?php echo esc_attr( $dynamic_typo_class ); ?>">
                <div class="middle-part-inner -left">
                    <?php get_template_part( 'parts/elements/menu_hamburger' ); ?>
                </div> 
            </div>
            <div class="bottom-part">
                <?php get_template_part( 'parts/elements/menu_optional' ); ?>

                <?php if ( $mobile_hamburger_position == 'right') : ?>
                    <div class="mobile-hamburger -right">
                        <?php get_template_part( 'parts/elements/menu_hamburger' ); ?>
                    </div>
                <?php endif; ?>

                <div class="close-menu"></div>
            </div>
        </div>
    </div>
</header>

<?php get_template_part( 'parts/elements/menu_hamburger_fullscreen' ); ?>