import { a as Ctx, G as GlobalPath, L as Loading, T as Trans } from "./index.js";
import React__default from "react";
import "./dateFns.js";
import "./validator.js";
import "./reactPlayer.js";
import "react-router-dom";
import "./reactSlick.js";
class LogoutPage extends React__default.Component {
  constructor(props) {
    super(props);
    this.appState = Ctx.getAppState();
  }
  async componentDidMount() {
    if (this.appState.getUser()) {
      await this.appState.logout();
    } else {
      this.appState.state.appHistory.replace(GlobalPath.Home.link);
    }
  }
  render() {
    return /* @__PURE__ */ React__default.createElement("div", {
      className: "mainPageContainer"
    }, /* @__PURE__ */ React__default.createElement(Loading, null, /* @__PURE__ */ React__default.createElement("strong", null, /* @__PURE__ */ React__default.createElement(Trans, {
      i18nKey: "LogoutPage.loading"
    }, "Logging you out..."))));
  }
}
export { LogoutPage as default };
