{% load i18n %}
{% comment %}
Top-of-page navigation between the four list views. Rendered by
each list / detail template via the include tag so a new view
reaches the operator without a per-template copy of the link
stack. ``active`` is the calling template's hint at which tab
should be visually selected; defaults to none.
{% endcomment %}
<nav class="mb-3" aria-label="{% translate 'Discord audit sections' %}">
    <ul class="nav nav-tabs">
        <li class="nav-item">
            <a class="nav-link{% if active == 'runs' %} active{% endif %}" href="{% url 'aa_discord_audit:run_list' %}"{% if active == 'runs' %} aria-current="page"{% endif %}>
                {% translate "Runs" %}
            </a>
        </li>
        {% if perms.aa_discord_audit.view_auditinvocation %}
            <li class="nav-item">
                <a class="nav-link{% if active == 'invocations' %} active{% endif %}" href="{% url 'aa_discord_audit:invocation_list' %}"{% if active == 'invocations' %} aria-current="page"{% endif %}>
                    {% translate "Attempts" %}
                </a>
            </li>
        {% endif %}
        {% if perms.aa_discord_audit.view_configchangelog %}
            <li class="nav-item">
                <a class="nav-link{% if active == 'changelog' %} active{% endif %}" href="{% url 'aa_discord_audit:changelog_list' %}"{% if active == 'changelog' %} aria-current="page"{% endif %}>
                    {% translate "Config changes" %}
                </a>
            </li>
        {% endif %}
    </ul>
</nav>
