{% load character_extras %}
<div class="col-12 col-md-6 col-xl-4">
    <h5>
        {{ path.display_name }} <span class="badge text-bg-dark rounded-pill">{{ path|max_rank:character }}</span>
        {% if character|managed_by:user %}
            <div class="btn-group btn-group-sm">
                <button hx-get="{% url "character:remove_last_in_path" character_pk=character.pk path_pk=path.pk %}"
                        hx-target="#paths-and-capabilities"
                        hx-swap="outerHTML"
                        class="btn btn-secondary">
                    <i class="fa-solid fa-minus"></i>
                </button>
                {% if path|has_next_capability:character %}
                    <button hx-get="{% url "character:add_next_in_path" character_pk=character.pk path_pk=path.pk %}"
                            hx-target="#paths-and-capabilities"
                            hx-swap="outerHTML"
                            class="btn btn-primary">
                        <i class="fa-solid fa-plus"></i>
                    </button>
                {% endif %}
            </div>
        {% endif %}
    </h5>
    {% if path.notes %}
        <div class="alert alert-primary">{{ path.notes }}</div>
    {% endif %}
    <div class="accordion capabilities">
        {% for character_capability in character_capabilities %}
            {% include "character/snippets/character_details/capability.html" %}
        {% endfor %}
    </div>
</div>
