{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig"  %}

{% import '@ChillPerson/AccompanyingPeriodWorkDuplicate/_details.html.twig' as details %}

{% block title %}{{ 'acpw_duplicate.title'|trans }}{% endblock %}

{% block content %}
    <div class="container-fluid content"><div class="duplicate-content">

            <h1>{{ 'acpw_duplicate.title'|trans }}</h1>
            <div class="col-md-11 border mb-3 mt-3 p-2">
                <p>{{ 'acpw_duplicate.description'|trans }}</p>
            </div>

            <div class="col-md-11">
                <div class="col">
                    <h4>{{ 'acpw_duplicate.to delete'|trans ~ ':' }}</h4>
                    <div class="accompanying-course-work">
                        <div class="flex-table">
                            {{ details.details(acpw2, accompanyingCourse) }}
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-11 mt-3">
                <div class="col">
                    <h4>{{ 'acpw_duplicate.to keep'|trans ~ ':' }}</h4>
                    <div class="accompanying-course-work">
                        <div class="flex-table">
                            {{ details.details(acpw, accompanyingCourse) }}
                        </div>
                    </div>
                </div>
            </div>

            {{ form_start(form) }}

            <div class="col-md-12 centered">

                <div class="container-fluid" style="padding-top: 1em;">
                    <div class="clear" style="padding-top: 10px;">
                        {{ form_widget(form.confirm) }}
                    </div>
                    <div class="col-11">
                        {{ form_label(form.confirm) }}
                    </div>
                </div>
            </div>

            <ul class="col-12 record_actions">
                <li class="cancel">
                    <a href="{{ path('chill_person_accompanying_period_work_assign_duplicate', {id : acpw.id}) }}" class="btn btn-cancel">
                        {{ 'Return'|trans }}
                    </a>
                </li>
                <li class="cancel">
                    <a  href="{{ path('chill_person_acpw_duplicate_confirm', { acpw1_id : acpw2.id, acpw2_id : acpw.id }) }}"
                        class="btn btn-action">
                        <i class="fa fa-exchange"></i>
                        {{ 'Invert'|trans }}
                    </a>
                </li>
                <li>
                    <button class="btn btn-submit" type="submit"><i class="bi bi-chevron-contract"></i>{{ 'Merge'|trans }}</button>
                </li>
            </ul>

            {{ form_end(form) }}

        </div></div>
{% endblock %}
