{% load i18n %}
{% comment %}
Back-office shop header + nav. Pass `active` = orders|manage|edit to hide the
button for the page you're already on.
{% endcomment %}
<div class="d-flex justify-content-between align-items-center mb-3">
    <h2 class="m-0">{{ shop.name }}</h2>
    <div class="d-flex gap-1">
        <a href="{% url 'backoffice:index' %}" class="btn btn-outline-secondary">
            <i class="fa-solid fa-arrow-left fa-fw"></i> {% trans "Back" %}</a>
        {% if active != 'orders' %}
        <a href="{% url 'backoffice:orders' shop.pk %}" class="btn btn-outline-info position-relative">
            <i class="fa-solid fa-inbox fa-fw"></i> {% trans "Orders" %}
            {% if shop.open_order_count %}<span class="badge rounded-pill bg-danger">{{ shop.open_order_count }}</span>{% endif %}</a>
        {% endif %}
        {% if active != 'manage' %}
        <a href="{% url 'backoffice:manage' shop.pk %}" class="btn btn-outline-success">
            <i class="fa-solid fa-warehouse fa-fw"></i> {% trans "Manage" %}</a>
        {% endif %}
        {% if active != 'edit' %}
        <a href="{% url 'backoffice:edit' shop.pk %}" class="btn btn-outline-primary">
            <i class="fa-solid fa-pen-to-square fa-fw"></i> {% trans "Edit" %}</a>
        {% endif %}
    </div>
</div>
