{% load i18n %}
<nav class="navbar navbar-expand-sm navbar-light bg-light">
    <div class="container-fluid">
        <a class="navbar-brand" href="{% url "purchase:list" %}">Checkout</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav me-auto mb-2 mb-sm-0">
                {% if perms.purchase.add_basket %}
                    <li class="nav-item">
                        <a href="{% url "purchase:new" %}" class="nav-link">{% translate "New basket" %}</a>
                    </li>
                {% endif %}
                {% if perms.purchase.view_basket %}
                    <li class="nav-item">
                        <a href="{% url "purchase:list" %}" class="nav-link">{% translate "Baskets" %}</a>
                    </li>
                    <li class="nav-item">
                        <a href="{% url "purchase:reports" %}" class="nav-link">{% translate "Reports" %}</a>
                    </li>
                {% endif %}
                {% if user.is_staff %}
                    <li class="nav-item">
                        <a class="nav-link" href="{% url "admin:index" %}">{% translate "Admin" %}</a>
                    </li>
                {% endif %}
            </ul>
        </div>
    </div>
</nav>
