<?php
/**
 * Displays the site navigation.
 *
 * @package blueboxed
 */

$wrapper_classes  = 'site-header';
?>

<nav class="navbar navbar-expand-lg navbar-light container py-1" data-submenu-label="<?php echo esc_attr__( 'Toggle submenu', 'blueboxed' ); ?>">

    <!-- Site Branding -->
    <?php get_template_part( 'template-parts/header/site-branding' ); ?>

    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="<?php echo esc_attr__( 'Toggle navigation', 'blueboxed' ); ?>">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="nav-right">
        <div class="collapse navbar-collapse" id="navbarNav">
            <?php
            wp_nav_menu(
                array(
                    'theme_location'  => 'primary',
                    'menu_class'      => 'navbar-nav ml-auto',
                    'items_wrap'      => '<ul id="primary-menu-list" class="navbar-nav ml-auto">%3$s</ul>',
                    'fallback_cb'     => 'wp_page_menu',
                )
            );
            ?>
            <button class="mobile-menu-close" type="button" aria-label="<?php echo esc_attr__( 'Close menu', 'blueboxed' ); ?>">
                <img src="<?php echo esc_url( blueboxed_THEME_ASSETS_DIR . '/images/close.png' ); ?>" alt="" >
            </button>
        </div><!-- #navbarNav -->

        <?php get_template_part( 'template-parts/header/site-search' ); ?>
    </div>

</nav>
