import * as e from "react";
import { Trans as a } from "react-i18next";
import { Tabs as s } from "./accelbyte-widgets174.mjs";
import { UpgradeToFullAccount as r } from "./accelbyte-widgets354.mjs";
import { LinkToExistingAccount as T } from "./accelbyte-widgets355.mjs";
import { TabButton as o } from "./accelbyte-widgets356.mjs";
import { CommonTitle as c } from "./accelbyte-widgets357.mjs";
class E extends e.Component {
  constructor(i) {
    super(i), this.showTitleAndTabs = () => {
      this.setState({ areTitleAndTabsHidden: !1 });
    }, this.hideTitleAndTabs = () => {
      this.setState({ areTitleAndTabsHidden: !0 });
    }, this.changeTab = (t) => {
      this.setState({ selectedTab: t });
    }, this.state = {
      areTitleAndTabsHidden: !1,
      selectedTab: "linkToExisting"
    };
  }
  render() {
    const { areTitleAndTabsHidden: i, selectedTab: t } = this.state, { oneTimeLinkCode: n, onRestart: l } = this.props;
    return /* @__PURE__ */ e.createElement(e.Fragment, null, !i && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement("div", { className: "my-6" }, /* @__PURE__ */ e.createElement(s, null, /* @__PURE__ */ e.createElement(
      o,
      {
        isActive: t === "linkToExisting",
        onClick: () => this.changeTab("linkToExisting"),
        label: /* @__PURE__ */ e.createElement(a, { i18nKey: "LinkAccountWithOneTimeCodePage.selectLinkMode.tab.linkToExisting" }, "Link to Existing Account")
      }
    ), /* @__PURE__ */ e.createElement(
      o,
      {
        isActive: t === "upgradeToFull",
        onClick: () => this.changeTab("upgradeToFull"),
        label: /* @__PURE__ */ e.createElement(a, { i18nKey: "LinkAccountWithOneTimeCodePage.selectLinkMode.tab.upgradeToFull" }, "Upgrade to Full Account")
      }
    )))), t === "upgradeToFull" && /* @__PURE__ */ e.createElement(
      r,
      {
        onHideTitle: this.hideTitleAndTabs,
        onShowTitle: this.showTitleAndTabs,
        onRestart: l,
        oneTimeLinkCode: n
      }
    ), t === "linkToExisting" && /* @__PURE__ */ e.createElement(T, { onHideTitle: this.hideTitleAndTabs, onRestart: l, oneTimeLinkCode: n }));
  }
}
export {
  E as SelectLinkMode
};
