<?php
/**
 * Displays top navigation
 *
 */

?>

<nav id="navbar" class="navbar navbar-expand-md w-100">
      <div class="container-fluid ">
        <div class="logo">
            <?php 
            if(has_custom_logo()){

              the_custom_logo(); 

            }else{
              echo '<h1 class="text-light"><a href="'.esc_url( home_url( '/' ) ).'">'.get_bloginfo( 'name' ).'</a></h1>';
            }
            ?>
        </div>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#main-menu" aria-controls="main-menu" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse " id="main-menu">
            <?php
            wp_nav_menu(array(
                'theme_location' => 'main-menu',
                'container' => false,
                'menu_class' => '',
                'fallback_cb' => '__return_false',
                'items_wrap' => '<ul id="%1$s" class="navbar-nav ms-auto mb-2 mb-md-0 %2$s">%3$s</ul>',
                'depth' => 3,
                'walker' => new maximgym_wp_nav_menu_walker()
            ));
            ?>
        </div>
      </div>
    </nav>

