{% from '@ChillBudget/Budget/_macros.html.twig' import table_elements, table_results %}

<div class="accordion" id="future_{{ entity.id }}">
    <div class="accordion-item">
        <h2 class="accordion-header" id="heading_future_{{ entity.id }}">
            <button
                class="accordion-button collapsed"
                type="button"
                data-bs-toggle="collapse"
                data-bs-target="#collapse_future_{{ entity.id }}"
                aria-expanded="false"
                aria-controls="collapse_future_{{ entity.id }}">
                <span class="folded">{{ 'Show future budget'|trans }}</span>
                <span class="unfolded text-secondary">{{ 'Hide budget'|trans }}</span>
            </button>
        </h2>

        <div id="collapse_future_{{ entity.id }}"
            class="accordion-collapse collapse"
            aria-labelledby="heading_future_{{ entity.id }}"
            data-bs-parent="#future_{{ entity.id }}">

            <div class="my-4">
                <h4 class="family-title resource"><i class="fa fa-fw fa-plus-square"></i>{{ 'Future resources'|trans }}</h4>

                {% if futureResources|length > 0 %}
                    {{ table_elements(futureResources, 'resource') }}
                {% else %}
                    <span class="chill-no-data-statement">{{ 'No future resources registered'|trans }}</span>
                {% endif %}

                <h4 class="family-title charge"><i class="fa fa-fw fa-minus-square"></i>{{ 'Future charges'|trans }}</h4>

                {% if futureCharges|length > 0 %}
                    {{ table_elements(futureCharges, 'charge') }}
                {% else %}
                    <span class="chill-no-data-statement">{{ 'No future charges registered'|trans }}</span>
                {% endif %}
            </div>
        </div>
    </div>
</div>
