<?php 

$header_sidebar_toggler = themesflat_get_opt('header_sidebar_toggler');
if (themesflat_get_opt_elementor('header_sidebar_toggler') != '') {
    $header_sidebar_toggler = themesflat_get_opt_elementor('header_sidebar_toggler');
}
$style_header = themesflat_get_opt('style_header');
if (themesflat_get_opt_elementor('style_header') != '') {
    $style_header = themesflat_get_opt_elementor('style_header');
}
$topbar = themesflat_get_opt('topbar_show');
if (themesflat_get_opt_elementor('topbar_show') != '') {
    $topbar = themesflat_get_opt_elementor('topbar_show');
}
$header_message = themesflat_get_opt('header_message');
if (themesflat_get_opt_elementor('header_message') != '') {
    $header_message = themesflat_get_opt_elementor('header_message');
}
$topbar_caption = themesflat_get_opt('topbar_caption');
if (themesflat_get_opt_elementor('topbar_caption') != '') {
    $topbar_caption = themesflat_get_opt_elementor('topbar_caption');
}
$topbar_address2 = themesflat_get_opt('topbar_address2');
if (themesflat_get_opt_elementor('topbar_address2') != '') {
    $topbar_address2 = themesflat_get_opt_elementor('topbar_address2');
}
$topbar_custom_infor = themesflat_get_opt('topbar_custom_infor');
if (themesflat_get_opt_elementor('topbar_custom_infor') != '') {
    $topbar_custom_infor = themesflat_get_opt_elementor('topbar_custom_infor');
}
$topbar_custom_infor_2 = themesflat_get_opt('topbar_custom_infor_2');
if (themesflat_get_opt_elementor('topbar_custom_infor_2') != '') {
    $topbar_custom_infor_2 = themesflat_get_opt_elementor('topbar_custom_infor_2');
}
$social_topbar = themesflat_get_opt('social_topbar');
if (themesflat_get_opt_elementor('social_topbar') != '') {
    $social_topbar = themesflat_get_opt_elementor('social_topbar');
}
$style_topbar = themesflat_get_opt('style_topbar');
if (themesflat_get_opt_elementor('style_topbar') != '') {
    $style_topbar = themesflat_get_opt_elementor('style_topbar');
}
$language_topbar = themesflat_get_opt('language_topbar');
if (themesflat_get_opt_elementor('language_topbar') != '') {
    $language_topbar = themesflat_get_opt_elementor('language_topbar');
}

$show_on_mobile = themesflat_get_opt('topbar_show_on_mobile');
if (themesflat_get_opt_elementor('topbar_show_on_mobile') != '') {
    $show_on_mobile = themesflat_get_opt_elementor('topbar_show_on_mobile');
}
?>

    <?php if ( $topbar == 1 ) :?>

        <?php if ( $style_topbar == 'topbar-02' ) :?>
        <!-- Topbar -->
            <div class="themesflat-top style-02">    
                <div class="container">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="container-inside">
                                <div class="content-left">
                                    <?php  
                                        if ( $language_topbar == 1 ):
                                            themesflat_language_switch();
                                        endif;
                                    ?>
                                    <?php  
                                        if ( $social_topbar == 1 ):
                                            themesflat_render_social();    
                                        endif;
                                    ?>
                                </div><!-- content-left -->
                            <div class="content-right">
                                <?php if( $topbar_custom_infor != '' ): ?>
                                    <div class="infor-topbar">
                                        <?php echo esc_html($topbar_custom_infor); ?>
                                    </div>
                                <?php endif; ?>
                            </div>
                    </div>
                </div>
                    </div>
                </div><!-- /.container -->        
            </div><!-- /.topbar -->
        <?php elseif ( $style_topbar == 'topbar-03' ) :?>
            <!-- Topbar -->
            <div class="themesflat-top style-03">    
                <div class="container">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="container-inside">
                                <div class="content-left">
                                    <?php if( $topbar_custom_infor != '' ): ?>
                                        <div class="infor-topbar">
                                            <?php echo esc_html($topbar_custom_infor); ?>
                                        </div>
                                    <?php endif; ?>
                                </div><!-- content-left -->
                            <div class="content-right">
                                <?php if( $topbar_custom_infor_2 != '' ): ?>
                                    <div class="infor-topbar">
                                        <?php echo esc_html($topbar_custom_infor_2); ?>
                                    </div>
                                <?php endif; ?>
                            </div>
                            
                    </div>
                </div>
                    </div>
                </div><!-- /.container -->        
            </div><!-- /.topbar -->
            <?php elseif ( $style_topbar == 'topbar-04' ) :?>
            <!-- Topbar -->
            <div class="themesflat-top style-04">    
                <div class="container">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="container-inside">
                                <div class="content-left">
                                    <?php get_template_part( 'tpl/header/brand'); ?>
                                </div><!-- content-left -->
                            <div class="content-right">
                                <?php if( $topbar_custom_infor != '' ): ?>
                                    <div class="infor-topbar">
                                        <?php echo esc_html($topbar_custom_infor); ?>
                                    </div>
                                <?php endif; ?>
                                <?php  
                                    if ( $social_topbar == 1 ): ?>
                                      <div class="social-header-2">
                                        <h6><?php esc_html_e( 'Follow Us', 'norstar' ); ?></h6>
                                        <?php themesflat_render_social();   ?>
                                    </div>
                                    <?php endif; ?>
                                <?php  
                                    if ( $language_topbar == 1 ):
                                        themesflat_language_switch();
                                    endif;
                                ?>
                            </div>
                    </div>
                </div>
                    </div>
                </div><!-- /.container -->        
            </div><!-- /.topbar -->
        <?php else: ?>
        <!-- Topbar -->
            <div class="themesflat-top <?php if ($show_on_mobile == 1) echo esc_attr('themesflat-top-hide'); ?> style-01">    
            <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="container-inside">
                        <div class="content-left">
                            <?php if( $topbar_custom_infor != '' ): ?>
                                <div class="infor-topbar">
                                    <?php echo wp_kses($topbar_custom_infor,themesflat_kses_allowed_html()); ?>
                                </div>
                            <?php endif; ?>
                        </div><!-- content-left -->
                        <div class="content-right">                
                            <?php  
                                if ( $social_topbar == 1 ):
                                    themesflat_render_social();    
                                endif;
                            ?>
                        </div>
                    </div>
                </div>
            </div>
            </div><!-- /.container -->        
            </div><!-- /.topbar -->
        <?php endif; ?>   
    <?php endif; ?>