{% sw_extends '@Storefront/storefront/page/checkout/_page.html.twig' %}

{% block base_header %}
    {% sw_include '@Storefront/storefront/layout/header/header-minimal.html.twig' %}
{% endblock %}

{% block base_navigation %}{% endblock %}

{% block page_checkout_main_content %}
    {% block page_checkout_finish %}
        {% block page_checkout_finish_details %}
            {% sw_include '@Storefront/storefront/page/checkout/finish/finish-details.html.twig' %}
        {% endblock %}

        {% block page_checkout_finish_product_table %}
            <div class="card checkout-product-table">
                <div class="card-body">
                    {% block page_checkout_finish_table_header %}
                        {% sw_include '@Storefront/storefront/component/checkout/cart-header.html.twig' with {
                            showTaxPrice: true,
                            showRemoveColumn: false
                        } %}
                    {% endblock %}

                    {% block page_checkout_finish_items %}
                        {% for lineItem in page.order.nestedLineItems %}
                            {% block page_checkout_finish_item %}
                                {% sw_include '@Storefront/storefront/component/line-item/line-item.html.twig' with {
                                    redirectTo: 'frontend.checkout.confirm.page',
                                    showTaxPrice: true,
                                    showRemoveButton: false
                                } %}
                            {% endblock %}
                        {% endfor %}
                    {% endblock %}
                </div>
            </div>
        {% endblock %}
    {% endblock %}
{% endblock %}

{% block page_checkout_additional %}
    {% if page.order.customerComment %}
        <div class="checkout-additional">
            {% block page_checkout_finish_customer_comment %}
                <div class="card checkout-card">
                    <div class="card-body">
                        {% block page_checkout_finish_customer_comment_header %}
                            <div class="card-title">
                                {{ "checkout.customerCommentHeader"|trans|sw_sanitize }}
                            </div>
                        {% endblock %}

                        {% block page_checkout_finish_customer_comment_content %}
                            <div class="checkout-customer-comment-control">{{ page.order.customerComment|sw_sanitize|nl2br }}</div>
                        {% endblock %}
                    </div>
                </div>
            {% endblock %}
        </div>
    {% endif %}
{% endblock %}

{% block base_footer %}
    {% sw_include '@Storefront/storefront/layout/footer/footer-minimal.html.twig' %}
{% endblock %}
