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

<nav class="navbar navbar-expand-lg navbar-dark bg-dark shadow-sm">
    <div class="container">
        <a class="navbar-brand font-weight-bold" href="#">
            <img src="/static/shopyo.svg" width="30" height="30" class="d-inline-block align-top mr-2" alt="Shopyo Logo">
            {{OUR_APP_NAME}} <span class="font-weight-light">| {{active_page.capitalize()}}</span>
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item">
                    <a class="nav-link" href="{{url_for('shopyo_dashboard.index')}}" title="Dashboard">
                        <i class="fas fa-columns mr-1"></i> Dashboard
                    </a>
                </li>
            </ul>
            <ul class="navbar-nav ml-auto">
                {% if (active_page != 'login') and (active_page != 'register') %}
                    <li class="nav-item">
                        <a class="nav-link" href="{{url_for('shopyo_auth.logout', next=request.url)}}" title="Logout">
                            <i class="fas fa-sign-out-alt mr-1"></i> Logout
                        </a>
                    </li>
                {% else %}
                    <li class="nav-item">
                        <a class="nav-link" href="{{url_for('shopyo_auth.login')}}" title="Login">Login</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{{url_for('shopyo_auth.register')}}" title="Register">Register</a>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>
