{{#extend "checkout" pageClass="page_checkout-delivery-details page_checkout-delivery-details_asm" title="Checkout - Delivery address ASM" logout=true isAsideSticky="true"}}
{{#content "steps"}}
{{> steps active-step-index="1" }}
{{/content}}
{{#content "main"}}
<div class="delivery-address">
    <div data-addresses>
        <div class="user-address js-selectable js-selectable_selected">
            <div class="row">
                <div class="user-address__content">
                    <div class="selected-address">
                        {{> radiobutton label="Use this delivery address" name="r1" id="r1" checked="true"}}
                    </div>
                    <div class="row">
                        <div class="user-address__address">
                            Mr John Smith <br>29 Acacia Road <br>London <br>N7 3BM <br>United Kingdom
                        </div>
                        <div class="user-address__phone">
                            07834 678 234
                        </div>
                    </div>
                </div>

                <div class="user-address__actions">
                    <button class="btn btn-secondary btn-remove-address">
                    <span class="btn__text">
                        <span class="fas fa-trash"></span>
                        Remove</span>
                    </button>

                    <a href class="btn btn-secondary" data-toggle="modal" data-target="#modalDeliveryEdit">
                        <span class="icon"><span class="fas fa-edit"></span></span>
                        <span class="btn__text">Edit</span>
                    </a>

                    <div class="default-mark-full">
                        Default
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div data-new-address style="display: none;">
        <div class="delivery-address__btn-back">
            <a href="#" class="link-primary btn-back-to-addresses">Back to choose address</a>
        </div>
        <form class="form-wrapper delivery-address-form" id="form-checkout-your-details" data-action="./page_checkout_delivery-details.html">
            <div class="delivery-address-form__inner">
                {{> checkout_your-details uid="cyd1" address-list=true}}
                <div class="form-row form-row__action">
                    <div class="form-row__col-btn">
                        <button class="btn btn-action btn_full">
                            <span class="btn__text">Delivery details</span>
                        </button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<div>
    <a href="#" class="btn-new-address">Add new address</a>
</div>
<a href="./page_checkout_delivery-details.html" class="btn_full btn btn-action checkout-widget__outer-button btn-delivery-details">Continue to delivery details
    <span class="icon">
        <i class="fas fa-arrow-right"></i>
    </span>
</a>
{{/content}}
{{#content "aside"}}
{{> checkout_order-summary label="Subtotal: "}}
{{> email-widget }}
{{> checkout_voucher voucherApplied=true}}
{{/content}}
{{#content "foot" mode="append"}}
<script defer src="js/page/checkout-delivery-address.js"></script>

{{#extend "modal" id="modalDeliveryEdit" title="Edit delivery address" fullWidth=true classMod="edit-delivery-addr-guest"}}
{{#content "sections"}}

{{#extend "modal-body-section" customSectionClass="edit-delivery-addr-guest__form"}}
{{#content "body"}}
<form class="form-wrapper" id="checkout-your-details-modal">
    {{> checkout_your-details open-delivery-block="true" uid="cyd2"}}
    <div class="form-row form-row__action">
        <div class="form-row__col-btn">
            <button class="btn btn-primary btn_full">
                <span class="btn__text">Save address</span>
            </button>
        </div>
    </div>
</form>
{{/content}}
{{/extend}}

{{/content}}
{{/extend}}

{{/content}}
{{/extend}}
