import { LoginIcon as o } from "./accelbyte-widgets303.mjs";
import { ErrorPath as l } from "./accelbyte-widgets69.mjs";
import { LoginPath as n } from "./accelbyte-widgets35.mjs";
import t from "react";
import { Trans as a } from "react-i18next";
import { Link as s } from "react-router-dom";
import "./accelbyte-widgets304.mjs";
const N = ({ currentLocation: r, onLogin: e }) => {
  const i = !l.ErrorRoot.is(r) && r;
  return /* @__PURE__ */ t.createElement("div", { className: "loginButtonContainer" }, e && /* @__PURE__ */ t.createElement(
    "button",
    {
      className: "loginButton",
      onClick: e ? (m) => {
        m.preventDefault(), e();
      } : void 0
    },
    /* @__PURE__ */ t.createElement(o, null),
    /* @__PURE__ */ t.createElement(a, { i18nKey: "Navigation.links.login" }, "Login")
  ), !e && /* @__PURE__ */ t.createElement(
    s,
    {
      className: "loginButton",
      to: n.Login.withSearchParams({
        [n.LoginURLGeneratorParamKeys.RETURN_PATH_PARAMS_KEY]: i || "/"
      })
    },
    /* @__PURE__ */ t.createElement(o, null),
    /* @__PURE__ */ t.createElement(a, { i18nKey: "Navigation.links.login" }, "Login")
  ));
};
export {
  N as LoginButtonContainer
};
