{% set nav_bar_log = [
  ('category'),
  ('appointments'),
  ('products'),
  ('settings'),
  ('people'),
  ('save'),
  ] %}

{% set active_page = active_page|default('none') %}

<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
  <!-- Brand/logo -->
  <a class="navbar-brand" href="#">
    <img src="/static/shopyo.svg" width="35" height="30">
    {{OUR_APP_NAME}} | {{active_page.capitalize()}}
  </a>

  <!-- Links -->
  <ul class="navbar-nav">
    <li class="nav-item">
      <a class="nav-link" href="/" title="Main Page"><i class="fas fa-home"></i></a>
    </li>
    {% if active_page == nav_bar_log[0] %}

      {% include "settings/nav.html" %}
      {% include "appointment/nav.html" %}
      {% include "people/nav.html" %}

    {% elif active_page == nav_bar_log[1] %}
      {% include "appointment/nav.html" %}


    {% elif active_page == nav_bar_log[3] %}
      {% include "settings/nav.html" %}
    
    {% elif active_page == nav_bar_log[4] %}
      {% include "people/nav.html" %}

    {% endif %}
    </ul>


    <ul class="navbar-nav ml-auto">
    
    {% if not active_page == 'login' %}
    <li class="nav-item">
      <a class="nav-link" href="{{url_for('login.logout')}}" title="Logout"><i class="fas fa-sign-out-alt"></i></a>
    </li>
    {% endif %}
  </ul>
</nav>
