@{
    Layout = "_ColumnsTwo";

    //title
    NopHtml.AddTitleParts(T("PageTitle.Account").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-account-page");
    NopHtml.AppendPageCssClassParts("html-gdpt-tools-page");
}
@section left
{
    @await Component.InvokeAsync(typeof(CustomerNavigationViewComponent), new { selectedTabId = CustomerNavigationEnum.GdprTools })
}

<div class="page account-page gdpr-tools-page">
    <div class="page-title">
        <h1>@T("Account.MyAccount") - @T("Account.Gdpr")</h1>
    </div>
    <div class="page-body">
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CustomerGdprToolsTop, additionalData = Model })
        @if (!string.IsNullOrEmpty(Model.Result))
        {
            <div class="result">
                @Model.Result
            </div>
        }
        <form asp-route="GdprTools" method="post">
            <div class="fieldset">
                <div class="title">
                    <strong>@T("Account.Gdpr.Export")</strong>
                </div>
                <div class="form-fields">
                    @T("Account.Gdpr.Export.Hint")
                </div>
                <div class="buttons">
                    <button type="submit" name="export-data" class="button-1 gdpr-export-data-button">@T("Account.Gdpr.Export.Button")</button>
                </div>
            </div>
            <div class="fieldset">
                <div class="title">
                    <strong>@T("Account.Gdpr.Delete")</strong>
                </div>
                <div class="form-fields">
                    @T("Account.Gdpr.Delete.Hint")
                </div>
                <div class="buttons">
                    <button type="submit" id="delete-account" name="delete-account" class="button-1 gdpr-delete-account-button">@T("Account.Gdpr.Delete.Button")</button>

                    <script asp-location="Footer">
                        $(function() {
                            $('#delete-account').on('click', function() {
                                return confirm('@T("Common.AreYouSure")');
                            });
                        });
                    </script>
                </div>
            </div>
        </form>
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.CustomerGdprToolsBottom, additionalData = Model })
    </div>
</div>