import { k as UIEvent, l as bgCommon, G as GlobalPath, T as Trans, a as Ctx } from "./index.js";
import { A as AccountDeletionSuccessPageLock } from "./AccountDeletionSuccessPageLock.js";
import React__default from "react";
import { Redirect, Link } from "react-router-dom";
import "./dateFns.js";
import "./validator.js";
import "./reactPlayer.js";
import "./reactSlick.js";
var AccountDeletionSuccesPage = "";
class AccountDeletionSuccessPage extends React__default.Component {
  componentDidMount() {
    UIEvent.updateBackground(`url(${bgCommon})`);
  }
  componentWillUnmount() {
    UIEvent.updateBackground(null);
  }
  render() {
    if (!AccountDeletionSuccessPageLock.peek()) {
      return /* @__PURE__ */ React__default.createElement(Redirect, {
        to: GlobalPath.Home.link
      });
    }
    const daysLeft = 28;
    async function onGoToHomeLinkClick() {
      Ctx.getGdprManager().ignoreDeletionMark();
      AccountDeletionSuccessPageLock.unlock();
      await Ctx.getAppState().logout();
    }
    return /* @__PURE__ */ React__default.createElement("div", {
      className: "deletionSuccessContainer"
    }, /* @__PURE__ */ React__default.createElement("main", null, /* @__PURE__ */ React__default.createElement("p", {
      className: "title"
    }, /* @__PURE__ */ React__default.createElement(Trans, {
      i18nKey: "RequestAccountDeletionSuccessPage.title"
    }, "Account Deletion")), /* @__PURE__ */ React__default.createElement("div", {
      className: "content"
    }, /* @__PURE__ */ React__default.createElement(Trans, {
      i18nKey: "RequestAccountDeletionSuccessPage.content"
    }, /* @__PURE__ */ React__default.createElement("p", {
      className: "top"
    }, "Your account is scheduled for deletion in ", { daysLeft }, " days. You will have the option to cancel the deletion process by logging in to your account within the next", { daysLeft }, " days."), /* @__PURE__ */ React__default.createElement("p", {
      className: "bottom"
    }, "We hope you come back soon!"))), /* @__PURE__ */ React__default.createElement(Link, {
      onClick: onGoToHomeLinkClick,
      to: GlobalPath.Home.link,
      className: "btn big btn-primary btnGoToHome"
    }, /* @__PURE__ */ React__default.createElement(Trans, {
      i18nKey: "RequestAccountDeletionSuccessPage.button.goToHomepage"
    }, "Go To Homepage"))));
  }
}
export { AccountDeletionSuccessPage as default };
