@model DeleteAccountModel
@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.DeleteAccount })
}
<validation-observer v-slot="{ handleSubmit }">
    <form asp-route="CustomerDeleteAccount" method="post" autocomplete="off" ref="form" v-on:submit.prevent="handleSubmit(formSubmit)">
        <section class="page account-page change-password-page pl-lg-3 pt-3 pt-lg-0">
            <h1 class="h2 generalTitle">@Loc["Account.DeleteAccount"]</h1>
            <div asp-validation-summary="ModelOnly" class="message-error"></div>
            <div class="alert alert-danger" role="alert">
                @Loc["Account.DeleteAccount.DangerAlert"]
            </div>
            <fieldset>
                <div class="form-fields">
                    <fieldset class="form-group">
                        <validation-provider tag="div" rules="required" name="Password" v-slot="{ errors, classes }">
                            <label asp-for="Password" class="col-form-label">@Loc["Account.DeleteAccount.Fields.Password"]:</label>
                            <input asp-for="Password" v-model="deleteaccount.Password" v-bind:class="[classes , 'form-control']" autofocus="autofocus" autocomplete="off" />
                            <span class="field-validation-error">{{ errors[0] }}</span>
                            <span asp-validation-for="Password"></span>
                        </validation-provider>
                    </fieldset>
                </div>
            </fieldset>
            <div class="text-xs-center">
                <input type="submit" class="btn btn-danger change-password-button" value="@Loc["Account.DeleteAccount.Button"]" onclick="return confirm('@Loc["Admin.Common.AreYouSure"]'); " />
            </div>
        </section>
    </form>
</validation-observer>
<script asp-location="Footer" asp-order="300">
    var deleteaccount = new Vue({
        data: () => ({
            Password: '',
        })
    });
</script>