<div id="navbar-main-container" class="navbar-container navbar-style1">
    <nav class="navbar navbar-light xs-navbar navbar-expand-lg">
        <a class="navbar-brand d-lg-none" href="<?php echo home_url('/'); ?>">
            <img src="<?php 
                echo esc_url(
                    vinkmag_src(
                        'general_main_logo',
                        VINKMAG_IMG . '/logo/logo_main.png'
                    )
                );
            ?>" alt="<?php bloginfo('name'); ?>">
        </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#primary-nav" aria-controls="primary-nav" aria-expanded="false" aria-label="<?php esc_html_e('Toggle navigation','vinkmag');?>">

        <span class="navbar-toggler-icon"></span>
    </button>

    <?php
    wp_nav_menu([
        'menu'            => 'primary',
        'theme_location'  => 'primary',
        'container'       => 'div',
        'container_id'    => 'primary-nav',
        'container_class' => 'collapse navbar-collapse',
        'menu_id'         => 'main-menu',
        'menu_class'      => 'navbar-nav  main-menu',
        'fallback_cb'     => 'vinkmag_navwalker::fallback',
        'depth'           => 3,
        'walker'          => new vinkmag_navwalker()
    ]);
    ?>
    </nav>

    <?php 
        $search_btn = vinkmag_option('header_show_search', 'show');
        $login_btn = vinkmag_option('header_show_login', 'show');
        if($search_btn == 'yes' or $login_btn == 'yes'):
    ?>
    <ul id="right-menu-element" class="right-menu align-to-right">

        <?php
        if($search_btn == 'yes'): ?>
        <li>
            <a class="nav-search-button header-search-btn-toggle" href="#">
                <i class="icon icon-search"></i>
            </a>
        </li>
        <?php endif; ?>
    </ul>
    <?php endif; ?>

    <?php get_search_form(); ?>
</div>