{% load i18n %}
{% load navactive %}

<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">{% translate "Toggle navigation" %}</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <a class="navbar-brand" href="{% url 'afat:dashboard' %}">{% translate "Fleet Activity Tracking" %}</a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="{% navactive request 'afat:statistics_overview afat:statistics_corporation afat:statistics_character afat:stats_ally' %}">
                    <a href="{% url 'afat:statistics_overview' %}">{% translate "Statistics" %}</a>
                </li>

                <li class="{% navactive request 'afat:fatlinks_overview afat:fatlinks_details_fatlink' %}">
                    <a href="{% url 'afat:fatlinks_overview' %}">{% translate "FAT Links" %}</a>
                </li>

                {% if perms.afat.add_fatlink or perms.afat.manage_afat %}
                    <li class="{% navactive request 'afat:fatlinks_add_fatlink' %}">
                        <a href="{% url 'afat:fatlinks_add_fatlink' %}">{% translate "Add FAT Link" %}</a>
                    </li>
                {% endif %}

                {% if perms.afat.log_view %}
                    <li class="{% navactive request 'afat:logs_overview' %}">
                        <a href="{% url 'afat:logs_overview' %}">{% translate "View Log" %}</a>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>
