@model CustomerAddressEditModel
@using Grand.Web.Models.Customer;
@inject IPageHeadBuilder pagebuilder
@{
    Layout = "_TwoColumns";

    //title
    pagebuilder.AddTitleParts(Loc["Title.Account"]);
}
@section left
{
    @await Component.InvokeAsync("CustomerNavigation", new { selectedTabId = AccountNavigationEnum.Addresses })
}
<vc:widget widget-zone="customer-address-edit-before" additional-data="@Model"></vc:widget>
<validation-observer v-slot="{ handleSubmit }">
    <form asp-route="CustomerAddressEdit" method="post" ref="form" v-on:submit.prevent="handleSubmit(formSubmit)">
        <div class="page account-page address-edit-page pl-lg-3 mb-3 pt-lg-0 pt-3">
            <h1 class="h2 generalTitle">@Loc["Account.CustomerAddresses.Edit"]</h1>
            <div asp-validation-summary="All" class="message-error"></div>
            @{
                var dataDictAddress = new ViewDataDictionary(ViewData);
                dataDictAddress.TemplateInfo.HtmlFieldPrefix = "Address";
                <partial name="Partials/CreateOrUpdateAddress" model="Model.Address" view-data="dataDictAddress" />
            }
            <vc:widget widget-zone="customer-address-edit-form" additional-data="@Model"></vc:widget>
            <div class="buttons generalMarginSupporter">
                <input type="submit" class="btn btn-info save-address-button" value="@Loc["Common.Save"]" />
            </div>
        </div>
    </form>
</validation-observer>
<vc:widget widget-zone="customer-address-edit-after" additional-data="@Model"></vc:widget>