{% extends '@SyliusShop/Checkout/layout.html.twig' %}

{% form_theme form '@SyliusShop/Form/theme.html.twig' %}

{% block content %}
    <div class="checkout-complete-container container">
        {{ sylius_template_event(['sylius.shop.checkout.complete.steps', 'sylius.shop.checkout.steps'], _context|merge({'active': 'complete', 'orderTotal': order.total})) }}

        {% include '@SyliusShop/Checkout/Complete/_header.html.twig' %}

        {{ sylius_template_event('sylius.shop.checkout.complete.after_content_header', {'order': order}) }}

        {% include '@SyliusShop/_flashes.html.twig' %}

        {{ form_start(form, {'action': path('sylius_shop_checkout_complete'), 'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate'}}) }}
        {{ form_errors(form) }}
        <input type="hidden" name="_method" value="PUT" />

        {{ sylius_template_event('sylius.shop.checkout.complete.summary', _context) }}

        <hr>

        {% include '@SyliusShop/Checkout/Complete/_form.html.twig' %}

        {{ sylius_template_event('sylius.shop.checkout.complete.before_navigation', {'order': order}) }}

        {% include '@SyliusShop/Checkout/Complete/_navigation.html.twig' %}

        {{ form_row(form._token) }}
        {{ form_end(form, {'render_rest': false}) }}
    </div>
{% endblock %}
