{% extends '@ChillPerson/Household/layout.html.twig' %}

{% set activeRouteKey = 'chill_person_household_composition_index' %}

{% block title  'Remove household composition'|trans %}

{% block display_content %}
    <p>{{ 'Concerns household n°%id%'|trans({ '%id%' : household.id } ) }}</p>
    <div class="wl-row">
                    <div class="wl-col title">
                        <h3>{{ 'Composition'|trans }}:</h3>
                    </div>
                    <div class="wl-col list">
                        {% for m in household.members %}
                            <span class="wl-item">
                                {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
                                    action: 'show', displayBadge: true,
                                    targetEntity: { name: 'person', id: m.person.id },
                                    buttonText: m.person|chill_entity_render_string,
                                    isDead: m.person.deathdate is not null
                                } %}
                            </span>
                        {% endfor %}
                    </div>
                </div>
{% endblock %}

{% block content %}
{{ include('@ChillMain/Util/confirmation_template.html.twig',
    {
        'title'             : 'Remove household composition'|trans,
        'confirm_question'  : 'Are you sure you want to remove this composition?'|trans,
        'display_content'   : block('display_content'),
        'cancel_route'      : 'chill_person_household_composition_index',
        'cancel_parameters' : { 'composition_id' : composition.id, 'id' : household.id },
        'form'              : form
    } ) }}
{% endblock %}