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

{% load spire_core_tags %}

{% block card_title %}
    {{ group.name }}
{% endblock %}

{% block card_button %}
    {% if perms.permission.change_portalgroup %}
        {% url 'permission:group_form' pk=group.pk as edit_group_url %}
        {% include 'spire/button/primary_dark_button.html' with button_icon='bi bi-pencil' button_text='Edit' button_href=edit_group_url %}
    {% endif %}
{% endblock %}

{% block card_title_content %}
    <div class="row">
        <div class="col">
            {% include 'spire/element/attribute_element.html' with attribute_title='Name' attribute_value=group.name %}
        </div>
        <div class="col">
            {% include 'spire/element/attribute_element.html' with attribute_title='Number of Users' attribute_value=group.user_set.count|default:'0' %}
        </div>
    </div>
{% endblock %}
