<?php
/**
 * Header Navbar (bootstrap5)
 *
 * @package Poster
 * @since 1.1.0
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

$container = get_theme_mod( 'poster_container_type' );
?>

<nav id="main-nav" class="navbar navbar-expand-md navbar-dark bg-primary posterprimary" aria-labelledby="main-nav-label">

	<h2 id="main-nav-label" class="screen-reader-text">
		<?php esc_html_e( 'Main Navigation', 'poster' ); ?>
	</h2>


	<div class="<?php echo esc_attr( $container ); ?>">


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

		<!-- The WordPress Menu goes here -->
		<?php
		wp_nav_menu(
			array(
				'theme_location'  => 'primary',
				'container_class' => 'collapse navbar-collapse',
				'container_id'    => 'navbarNavDropdowna',
				'menu_class'      => 'navbar-nav',
				'fallback_cb' => 'poster_primary_menu_fallback',
				'menu_id'         => 'main-menu',
				'walker'          => new poster_WP_Bootstrap_Navwalker(),
			)
		);
		?>
		
			<!-- Your site branding in the menu -->
		<?php // get_template_part( 'global-templates/navbar-branding' ); ?>

	</div><!-- .container(-fluid) -->

</nav><!-- #main-nav -->
