<?php
$current_user = wp_get_current_user();
?>
<header class="header-mobile-4 d-block d-md-none">
    <div class="header-mobile-wrapper">
        <div class="menu-container">
            <span class="menu-handler">
                <?php get_template_part('themeplat/responsive/header/menu-mobile', 'header'); ?>
            </span>
        </div>
        <div class="logo-container">
            <a href="<?php echo get_home_url(); ?>" title="<?php echo bloginfo('name'); ?>">
                <img src="<?php echo ot_get_option('logo_blog_barsa'); ?>">
            </a>
        </div>
    </div>
</header>
<div class="mobile-4-baner d-block d-md-none">
    <div class="am__header-inside-logo">
        <?php
        echo ot_get_option('select_baner_code_html_four');
        if (ot_get_option('select_baner_four')) : ?>
            <a href="<?php echo ot_get_option('select_link_baner_four'); ?>" target="_blank">
                <img src="<?php echo ot_get_option('select_baner_four'); ?>">
            </a>
        <?php endif; ?>
    </div>
</div>
<header class="header-4 d-none d-md-block">
    <?php
    $show__menu_bar_four  = ot_get_option('show__menu_bar_four', true);
    if ($show__menu_bar_four  == 'on') :
    ?>
        <section class="header-topbar-4">
            <div class="content-wrap">
                <div class="container">
                    <div class="topbar-inner">
                        <div class="section-menu cd-main-nav">
                        <?php wp_nav_menu(array('theme_location' => 'menu-bar-head', 'walker' => new ASG_Megamenu_Walker())); ?>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    <?php endif; ?>
    <div class="header-inner">
        <div class="content-wrap">
            <div class="container">
                <div class="row">
                    <div class="logo-col col-4">
                        <div class="site-branding">
                            <a href="<?php echo get_home_url(); ?>" title="<?php echo bloginfo('name'); ?>">
                                <img src="<?php echo ot_get_option('logo_blog_header_4'); ?>">
                            </a>
                            <span class="site-title"><?php echo bloginfo('name'); ?></span>
                            </a>
                        </div>
                    </div>
                    <div class="sidebar-col col-8">
                        <aside>
                            <div class="am__header-inside-logo">
                                <?php
                                echo ot_get_option('select_baner_code_html_four');
                                if (ot_get_option('select_baner_four')) : ?>
                                    <a href="<?php echo ot_get_option('select_link_baner_four'); ?>" target="_blank">
                                        <img src="<?php echo ot_get_option('select_baner_four'); ?>" style="float: left;">
                                    </a>
                                <?php endif; ?>
                            </div>
                        </aside>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="header-4-main-menu">
        <div class="main-menu-wrapper">
            <div class="container">
                <div class="row">
                    <div class="col-10">
                        <div class=" section-menu cd-main-nav">
                            <?php wp_nav_menu(array('theme_location' => 'main-menu', 'walker' => new ASG_Megamenu_Walker())); ?>
                        </div>
                    </div>
                    <div class="col-2">
                        <div class="user-pane">
                            <?php
                            if (!0 == $current_user->ID) :
                                get_template_part('themeplat/login/blo-but-login', 'button');
                            else :
                            ?>
                                <div onclick="document.getElementById('id01').style.display='block'" style="width:auto;cursor:pointer;">
                                    <i class="user-login-but fal fa-user-circle" onclick="document.getElementById('id01').style.display='block'" style="width:auto;" aria-hidden="true"></i>
                                </div>
                            <?php endif; ?>
                        </div>
                        <div class="search search-btn">
                            <a href="#search">
                                <i class="fal fa-search"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<div style="padding-bottom:2rem;"></div>
<?php get_template_part('themeplat/search/search-pop', 'search'); ?>
<?php get_template_part('themeplat/login/register', 'header'); ?>