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

{% block card_content %}
    <div
        x-data="{
            card_title_dropdown: false,
            toggle_card_title_dropdown() {
                this.card_title_dropdown = !this.card_title_dropdown
            }
        }"
    >
        <div class="row justify-content-between align-items-center mb-2 pb-2 border-bottom">
            <div class="col">
                <div class="card-title text-uppercase mb-0">
                    {% block card_title %}
                    {% endblock %}
                </div>
            </div>
            <div class="col-auto d-flex">
                {% block card_button %}
                {% endblock %}
            </div>
        </div>
        <div x-show="card_title_dropdown" x-cloak x-collapse>
            {% block card_dropdown_content %}
            {% endblock %}
        </div>
        <div style="{% block card_title_content_style %}{% endblock %}">
            {% block card_title_content %}
            {% endblock %}
        </div>
    </div>
{% endblock %}
