{block name='checkout-step5-confirmation'}
    {$lazyLoadImages=$lazyLoadImages|default:true}
    {$agbWrbCheckboxPosition=$agbWrbCheckboxPosition|default:'default'}
    <div id="order-confirm" class="checkout-confirmation">
        {block name='checkout-step5-confirmation-heading'}
            <h1>{lang section='checkout' key='summary'}</h1>
        {/block}
        {block name='checkout-step5-confirmation-alert'}
            {if !empty($smarty.get.mailBlocked)}
                <div role="alert" class="alert alert-danger">{lang key='kwkEmailblocked' section='errorMessages'}</div>
            {/if}
            {if !empty($smarty.get.fillOut)}
                <div role="alert" class="alert alert-danger">{lang key='mandatoryFieldNotification' section='errorMessages'}</div>
            {/if}
        {/block}
        {block name='checkout-step5-confirmation-content'}
            <div class="row">
                <div class="{block name='checkout-step5-confirmation-content-classes'}col col-12 col-lg-9{/block}">
                    {block name='checkout-step5-confirmation-main'}
                        <div class="row row-eq-height">
                            <div class="col col-12">
                                {block name='checkout-step5-confirmation-billing-information'}
                                    <div class="{block name='checkout-step5-confirmation-billing-information-class'}et-boxed-content{/block}">
                                        <div class="row">
                                            {block name='checkout-step5-confirmation-billing-information-inner'}
                                                {* Billing and Shipping Address *}
                                                <div class="col col-12 col-lg-8 checkout-confirmation-billing-address-wrapper" id="billing-address">
                                                    {block name='checkout-step5-confirmation-delivery-billing-address'}
                                                        <div class="row checkout-confirmation-billing-address-header">
                                                            {* Billing address header *}
                                                            {block name='checkout-step5-confirmation-delivery-billing-address-header'}
                                                                <div class="col col-12">
                                                                    <div class="h3 checkout-confirmation-heading">{lang section="account data" key='billingAndDeliveryAddress'}</div>
                                                                </div>
                                                            {/block}
                                                        </div>

                                                        <div class="row checkout-confirmation-billing-address-body">
                                                            {* Shipping and Billing Address *}
                                                            {block name='checkout-step5-confirmation-delivery-billing-address-body'}
                                                                <div class="col col-12 col-md-6 checkout-confirmation-billing-address">
                                                                    {block name='checkout-step5-confirmation-include-inc-billing-address'}
                                                                        <div class="checkout-confirmation-billing-address-content">
                                                                            {block name='checkout-step5-confirmation-include-inc-billing-address-header'}
                                                                                <header class="checkout-confirmation-content-header">
                                                                                    <strong class="title">
                                                                                        {lang key='billingAdress' section='account data'}
                                                                                        <a class="checkout-confirmation-change-link link-discreet"
                                                                                            href="{get_static_route id='bestellvorgang.php'}?editRechnungsadresse=1"
                                                                                            aria-label="{lang key='change'}"
                                                                                            title="{lang key="modifyBillingAdress" section="global"}"
                                                                                        >
                                                                                            <span class="{et_getIcon key="edit"}"></span>
                                                                                        </a>
                                                                                    </strong>
                                                                                </header>
                                                                            {/block}

                                                                            {include file='checkout/inc_billing_address.tpl'}

                                                                            {block name='checkout-step5-confirmation-include-inc-billing-address-footer'}
                                                                                <footer class="checkout-confirmation-content-footer">
                                                                                    {* Edit Link in Footer *}
                                                                                    {* <a class="checkout-confirmation-change-link link-discreet"
                                                                                        href="{get_static_route id='bestellvorgang.php'}?editRechnungsadresse=1"
                                                                                        aria-label="{lang key='change'}"
                                                                                        title="{lang key="modifyBillingAdress" section="global"}"
                                                                                    >
                                                                                        <span class="checkout-confirmation-change">{lang key="modifyBillingAdress" section="global"}</span>
                                                                                        <span class="{et_getIcon key="edit"}"></span>
                                                                                    </a> *}
                                                                                </footer>
                                                                            {/block}
                                                                        </div>
                                                                    {/block}
                                                                </div>

                                                                <div class="col col-12 col-md-6 checkout-confirmation-delivery-address">
                                                                    {block name='checkout-step5-confirmation-include-inc-delivery-address'}
                                                                        <div class="checkout-confirmation-delivery-address-content">
                                                                            {block name='checkout-step5-confirmation-include-inc-delivery-address-header'}
                                                                                <header class="checkout-confirmation-content-header">
                                                                                    <strong class="title">
                                                                                        {lang key='shippingAdress' section='account data'}
                                                                                        <a class="checkout-confirmation-change-link link-discreet"
                                                                                            href="{get_static_route id='bestellvorgang.php'}?editRechnungsadresse=1"
                                                                                            aria-label="{lang key='change'}"
                                                                                            title="{lang key="modifyShippingAdress" section="checkout"}""
                                                                                        >
                                                                                            <span class="{et_getIcon key="edit"}"></span>
                                                                                        </a>
                                                                                    </strong>
                                                                                </header>
                                                                            {/block}

                                                                            {include file='checkout/inc_delivery_address.tpl'}

                                                                            {block name='checkout-step5-confirmation-include-inc-delivery-address-footer'}
                                                                                <footer class="checkout-confirmation-content-footer">
                                                                                    {* Edit Link in Footer *}
                                                                                    {* <a class="checkout-confirmation-change-link link-discreet"
                                                                                        href="{get_static_route id='bestellvorgang.php'}?editRechnungsadresse=1"
                                                                                        aria-label="{lang key='change'}"
                                                                                        title="{lang key="modifyShippingAdress" section="checkout"}"
                                                                                    >
                                                                                        <span class="checkout-confirmation-change">{lang key="modifyShippingAdress" section="checkout"}</span>
                                                                                        <span class="{et_getIcon key="edit"}"></span>
                                                                                    </a> *}
                                                                                </footer>
                                                                            {/block}
                                                                        </div>
                                                                    {/block}
                                                                </div>
                                                            {/block}
                                                        </div>
                                                    {/block}
                                                </div>

                                                {* Shipping and Payment Type *}
                                                <div class="col col-12 col-lg-4" id="shipping-method">
                                                    {block name='checkout-step5-confirmation-shipping-billing-method'}
                                                        <div class="checkout-confirmation-shipping">
                                                            {* Billing Method Header *}
                                                            {block name='checkout-step5-confirmation-shipping-billing-method-header'}
                                                                <div class="h3 checkout-confirmation-heading">{lang section="account data" key='shippingAndPaymentOptions'}</div>
                                                            {/block}

                                                            {* Billing method Body *}
                                                            {block name='checkout-step5-confirmation-shipping-billing-method-body'}
                                                                <div class="checkout-confirmation-shipping-body">
                                                                    {* Shipping Method *}
                                                                    {block name='checkout-step5-confirmation-shipping-method'}
                                                                        <div class="checkout-confirmation-shipping-method">
                                                                            {block name='checkout-step5-confirmation-shipping-method-header'}
                                                                                <header class="checkout-confirmation-content-header">
                                                                                    <strong class="title">{lang key='shippingOptions'}: </strong>
                                                                                    {$smarty.session.Versandart->angezeigterName|trans}
                                                                                    <a class="checkout-confirmation-change-link link-discreet"
                                                                                        href="{get_static_route id='bestellvorgang.php'}?editVersandart=1"
                                                                                        aria-label="{lang key='change'}"
                                                                                        title="{lang key="modifyShippingOption" section="checkout"}"
                                                                                    >
                                                                                        <span class="{et_getIcon key="edit"}"></span>
                                                                                    </a>
                                                                                </header>
                                                                            {/block}

                                                                            {block name='checkout-step5-confirmation-shipping-method-content'}
                                                                                {$cEstimatedDelivery = JTL\Session\Frontend::getCart()->getEstimatedDeliveryTime()}
                                                                                {if isset($cEstimatedDelivery) && strlen($cEstimatedDelivery) > 0}
                                                                                    <p class="small text-muted-util">
                                                                                        <strong>{lang key='shippingTime'}</strong>: {$cEstimatedDelivery}
                                                                                    </p>
                                                                                {/if}
                                                                            {/block}

                                                                            {block name='checkout-step5-confirmation-shipping-method-footer'}
                                                                                <footer class="checkout-confirmation-content-footer">
                                                                                    {* Edit Link in Footer *}
                                                                                    {* <a class="checkout-confirmation-change-link link-discreet"
                                                                                        href="{get_static_route id='bestellvorgang.php'}?editVersandart=1"
                                                                                        aria-label="{lang key='change'}"
                                                                                        title="{lang key="modifyShippingOption" section="checkout"}"
                                                                                    >
                                                                                        <span class="checkout-confirmation-change">{lang key="modifyShippingOption" section="checkout"}</span>
                                                                                        <span class="{et_getIcon key="edit"}"></span>
                                                                                    </a> *}
                                                                                </footer>
                                                                            {/block}
                                                                        </div>
                                                                    {/block}

                                                                    {* Payment Method *}
                                                                    {block name='checkout-step5-confirmation-payment-method'}
                                                                        <div class="checkout-confirmation-payment-method">
                                                                            {block name='checkout-step5-confirmation-payment-method-header'}
                                                                                <header class="checkout-confirmation-content-header">
                                                                                    <strong class="title">{lang key='paymentOptions'}: </strong>
                                                                                    {$smarty.session.Zahlungsart->angezeigterName|trans}
                                                                                    <a class="checkout-confirmation-change-link link-discreet"
                                                                                        href="{get_static_route id='bestellvorgang.php'}?editVersandart=1"
                                                                                        aria-label="{lang key='change'}"
                                                                                        title="{lang key="modifyPaymentOption" section="checkout"}"
                                                                                    >
                                                                                        <span class="{et_getIcon key="edit"}"></span>
                                                                                    </a>
                                                                                </header>
                                                                            {/block}

                                                                            {block name='checkout-step5-confirmation-payment-method-content'}
                                                                                {if isset($smarty.session.Zahlungsart->cHinweisText) && !empty($smarty.session.Zahlungsart->cHinweisText)}{* this should be localized *}
                                                                                    <p class="small text-muted-util">{$smarty.session.Zahlungsart->cHinweisText}</p>
                                                                                {/if}
                                                                            {/block}

                                                                            {block name='checkout-step5-confirmation-payment-method-footer'}
                                                                                <footer class="checkout-confirmation-content-footer">
                                                                                    {* Edit Link in Footer *}
                                                                                    {* <a class="checkout-confirmation-change-link link-discreet"
                                                                                        href="{get_static_route id='bestellvorgang.php'}?editVersandart=1"
                                                                                        aria-label="{lang key='change'}"
                                                                                        title="{lang key="modifyPaymentOption" section="checkout"}"
                                                                                    >
                                                                                        <span class="checkout-confirmation-change">{lang key="modifyPaymentOption" section="checkout"}</span>
                                                                                        <span class="{et_getIcon key="edit"}"></span>
                                                                                    </a> *}
                                                                                </footer>
                                                                            {/block}
                                                                        </div>
                                                                    {/block}
                                                                </div>
                                                            {/block}
                                                        </div>
                                                    {/block}
                                                </div>
                                            {/block}
                                        </div>
                                    </div>
                                {/block}
                            </div>
                        </div>
                        {block name='checkout-step5-confirmation-comment-wrapper'}
                        <div class="row">
                            {* Comment *}
                            <div class="col col-12">
                                {block name='checkout-step5-confirmation-comment'}
                                    <div id="panel-edit-comment" class="{block name="checkout-step5-confirmation-comment-class"}et-boxed-content{/block}">
                                        {if isset($commentOpenByDefault) && !$commentOpenByDefault && empty($smarty.session.kommentar)}
                                            {block name='checkout-step5-confirmation-comment-trigger'}
                                                <div class="col col-12">
                                                    <a href="#" class="link-discreet et-checkout-comment-trigger" title="{lang key='orderComments' section='shipping payment'}" onclick="$('.et-checkout-comment-trigger-target').show();$(this).hide();return false;">
                                                        <i class="{et_getIcon key="edit"} et-icon-fw"></i>&nbsp;{lang key='orderComments' section='shipping payment'}
                                                    </a>
                                                </div>
                                            {/block}
                                        {/if}
                                        <div class="et-checkout-comment-trigger-target"{if isset($commentOpenByDefault) && !$commentOpenByDefault && empty($smarty.session.kommentar)} style="display:none;"{/if}>
                                            {block name='checkout-step5-confirmation-comment-header'}
                                                <div class="h3 checkout-confirmation-heading">{lang key='comment' section='product rating'}</div>
                                            {/block}

                                            {block name='checkout-step5-confirmation-comment-body'}
                                                {lang assign='orderCommentsTitle' key='orderComments' section='shipping payment'}
                                                <textarea title="{$orderCommentsTitle|escape:'html'}"
                                                    name="kommentar"
                                                    cols="50"
                                                    rows="3"
                                                    id="comment"
                                                    placeholder="{$orderCommentsTitle|escape:'html'}"
                                                    aria-label="{$orderCommentsTitle|escape:'html'}"
                                                    class="form-control checkout-confirmation-comment"
                                                >{if isset($smarty.session.kommentar)}{$smarty.session.kommentar}{/if}</textarea>
                                            {/block}
                                        </div>
                                    </div>
                                {/block}
                            </div>
                        </div>
                        {/block}
                        {block name="checkout-step5-confirmation-pre-form-hr"}
                        {/block}

                        {* Order Items *}
                        {block name='checkout-step5-confirmation-form'}
                            <div class="row">
                                <div class="col col-12">
                                    {block name='checkout-step5-confirmation-confirm-order-wrapper'}
                                        <div class="{block name="checkout-step5-confirmation-confirm-order-wrapper-class"}et-boxed-content mb-0{/block}">
                                            {block name='checkout-step5-confirmation-confirm-order'}
                                                <div class="checkout-confirmation-items basket-final">
                                                    <div id="panel-submit-order">
                                                        {* Order Items Table *}
                                                        {block name='checkout-step5-confirmation-order-items'}
                                                            {block name='checkout-step5-confirmation-order-items-header'}
                                                                <h3>{lang key='basket'}</h3>
                                                            {/block}

                                                            {block name='checkout-step5-confirmation-include-inc-order-items'}
                                                                {include file='checkout/inc_order_items.tpl' tplscope='confirmation' lazyLoadImages=$lazyLoadImages}
                                                            {/block}
                                                        {/block}

                                                        {* Modify Basket *}
                                                        {block name='checkout-step5-confirmation-order-items-actions'}
                                                            <div class="row checkout-button-row">
                                                                <div class="col col-12 col-md-6 col-lg-3 order-2 order-md-1">
                                                                    <a href="{get_static_route id='warenkorb.php'}" class="link-discreet">
                                                                        <i class="{et_getIcon key="edit"}"></i>
                                                                        {lang key='modifyBasket' section='checkout'}
                                                                    </a>
                                                                </div>
                                                            </div>
                                                        {/block}
                                                    </div>
                                                </div>
                                            {/block}
                                        </div>
                                    {/block}
                                </div>
                            </div>
                        {/block}
                    {/block}
                </div>
                {* Sidebar *}
                {block name='checkout-step5-confirmation-sidebar'}
                    <div class="{block name='checkout-step5-confirmation-sidebar-classes'}col col-12 col-lg-3 ml-auto{/block}">
                        {include file="widgets/snippets/checkout_sidebar.tpl" context="checkout_step5" couponOpenByDefault=$couponOpenByDefault|default:true agbWrbCheckboxPosition=$agbWrbCheckboxPosition}
                    </div>
                {/block}
            </div>
        {/block}
    </div>
{/block}
