import { FormGroupError as n } from "./accelbyte-widgets263.mjs";
import * as e from "react";
import { Trans as t } from "react-i18next";
import { ValidateDisplayNameErrorType as s } from "./accelbyte-widgets530.mjs";
import { ValidateEmailErrorType as i } from "./accelbyte-widgets340.mjs";
import { CommonValidationErrorType as E } from "./accelbyte-widgets341.mjs";
import { ValidateRegexErrorType as c } from "./accelbyte-widgets290.mjs";
import { ValidateLengthErrorType as o } from "./accelbyte-widgets289.mjs";
import { ValidateAlphaNumericErrorType as m } from "./accelbyte-widgets293.mjs";
import { MAX_SHORT_TEXT_LENGTH as d } from "./accelbyte-widgets339.mjs";
const w = (r, a) => {
  if (!r || !a.min || !a.max)
    return null;
  switch (r) {
    case o.enum.empty:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "linkPlatformAccountPage.LinkNewAccount.form.passwordEmptyError" }, "You must fill in a password"));
    case o.enum.lessThanLengthLimit:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "linkPlatformAccountPage.LinkNewAccount.form.passwordLessThanLengthLimit" }, "Your password must contain at least ", { PASSWORD_MIN_LIMIT: a.min }, " characters"));
    case o.enum.exceedLengthLimit:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "linkPlatformAccountPage.LinkNewAccount.form.passwordExceedLimit" }, "Your password must not exceed ", { PASSWORD_MAX_LENGTH: a.max }, " characters"));
    case c.enum.invalidFormat:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "linkPlatformAccountPage.LinkNewAccount.form.passwordInvalidFormat" }, "Please enter a valid password"));
    default:
      return /* @__PURE__ */ e.createElement(t, { i18nKey: "CommonError.unknownError" }, "Something went wrong. Please contact support for assistance.");
  }
}, k = (r, a = {}) => {
  if (!r)
    return null;
  switch (r) {
    case o.enum.empty:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "AccountMyProfilePage.form.displayNameEmptyError" }, "The display name cannot be empty."));
    case o.enum.lessThanLengthLimit:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "AccountMyProfilePage.form.lessThanLengthLimit" }, "Your display name must contain at least ", { DISPLAY_NAME_MIN_LIMIT: a.min }, " characters"));
    case o.enum.exceedLengthLimit:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "AccountMyProfilePage.form.displayNameExceedLimit" }, "Display name must not exceed ", { MAX_DISPLAY_NAME_LENGTH: a.max }, " characters"));
    case c.enum.invalidFormat:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "AccountMyProfilePage.form.displayNameInvalidFormat" }, "Please enter a valid display name format"));
    default:
      return /* @__PURE__ */ e.createElement(t, { i18nKey: "CommonError.unknownError" }, "Something went wrong. Please contact support for assistance.");
  }
}, M = (r, a = {}) => {
  if (!r)
    return null;
  switch (r) {
    case o.enum.empty:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "AccountMyProfilePage.form.userName.emptyError" }, "The username cannot be empty"));
    case o.enum.lessThanLengthLimit:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "AccountMyProfilePage.form.userName.lessThanLengthLimit" }, "Your username must contain at least ", { MIN_USERNAME_LENGTH: a.min }, " characters"));
    case o.enum.exceedLengthLimit:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "AccountMyProfilePage.form.userName.exceedLimit" }, "Your username must not exceed ", { MAX_USERNAME_LENGTH: a.max }, " characters"));
    case c.enum.invalidFormat:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "AccountMyProfilePage.form.userName.invalidFormat" }, "Please enter a valid username format"));
    default:
      return /* @__PURE__ */ e.createElement(t, { i18nKey: "CommonError.unknownError" }, "Something went wrong. Please contact administrator.");
  }
}, K = (r) => {
  if (!r)
    return null;
  switch (r) {
    case m.enum.empty:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "linkPlatformAccountPage.LinkNewAccount.verifyCodeError.empty" }, "You must enter your verification code"));
    case m.enum.exceedLengthLimit:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "linkPlatformAccountPage.LinkNewAccount.verifyCodeError.ExceedLimit" }, "Verification code must not exceed ", { MAX_SHORT_TEXT_LENGTH: d }, " characters"));
    case m.enum.invalidFormat:
      return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(t, { i18nKey: "linkPlatformAccountPage.LinkNewAccount.verifyCodeError.invalidFormat" }, "Please enter a valid verification code"));
    default:
      return /* @__PURE__ */ e.createElement(t, { i18nKey: "CommonError.unknownError" }, "Something went wrong. Please contact support for assistance.");
  }
}, T = (r, { minLength: a, maxLength: l } = {}) => {
  if (!r)
    return null;
  const u = {
    [i.enum.empty]: /* @__PURE__ */ e.createElement(t, { i18nKey: "LinkPlatformAccountPage.LinkNewAccount.emailError.empty" }, "Email is required"),
    [i.enum.lessThanLengthLimit]: /* @__PURE__ */ e.createElement(t, { i18nKey: "LinkPlatformAccountPage.LinkNewAccount.emailError.lessThanLengthLimit" }, "Email must not less than ", { MIN_EMAIL_LENGTH: a }, " characters"),
    [i.enum.exceedLengthLimit]: /* @__PURE__ */ e.createElement(t, { i18nKey: "LinkPlatformAccountPage.LinkNewAccount.emailError.ExceedLimit" }, "Email must not exceed ", { MAX_EMAIL_LENGTH: l }, " characters"),
    [s.enum.invalidFormat]: /* @__PURE__ */ e.createElement(t, { i18nKey: "LinkPlatformAccountPage.LinkNewAccount.emailError.InvalidFormat" }, "Please provide a valid Email format"),
    [E.enum.containsForbiddenWords]: /* @__PURE__ */ e.createElement(t, { i18nKey: "LinkPlatformAccountPage.LinkNewAccount.emailError.containsForbiddenWords" }, "Email contains prohibited word or use blocked domain")
  };
  return /* @__PURE__ */ e.createElement(n, null, u[r]);
};
export {
  T as DisplayEmailValidationError,
  k as DisplayNameValidationError,
  K as DisplayVerificationCodeError,
  w as PasswordValidationError,
  M as UserNameValidationError
};
