{% extends 'django_spire/card/title_card.html' %}

{% block card_title_content_style %}{% endblock %}

{% block card_title %}
    Tickets
{% endblock %}

{% block card_button %}
    {% if AuthController.help_desk.can_add %}
        <div class="col text-end mb-1">
            {% url 'django_spire:help_desk:form:create' as create_url %}
            {% include 'django_spire/button/primary_button.html' with button_text='Add' button_href=create_url button_icon="bi bi-plus" %}
        </div>
    {% endif %}
{% endblock %}

{% block card_title_content %}
    {% for ticket in tickets %}
        {% include 'django_spire/help_desk/item/ticket_item.html' %}
    {% empty %}
        {% include 'django_spire/item/no_data_item.html' %}
    {% endfor %}
{% endblock %}
