import { aO as f, az as c, a as A, j as n, h as o, T as i, i as y } from "./index-162fd1aa.mjs";
import t from "react";
const k = (m) => {
  var s;
  const { error: l, accountConflictInformation: e, onDismiss: a } = m;
  if ((e == null ? void 0 : e.errorCode) === f && e) {
    const r = c.getPlatformName(e.platformId), u = ((s = A.getUserManager().state.userProfile) == null ? void 0 : s.customAttributes) || {}, { displayName: d, platformUserId: p } = u[e.platformId] || {
      displayName: "",
      platformUserId: ""
    };
    return /* @__PURE__ */ t.createElement(n, { className: "mb-6", type: o.danger, onDismiss: a }, /* @__PURE__ */ t.createElement(i, { i18nKey: "LinkedAccountpage.cannotLinkWithAnotherAccount" }, "Unable to link this ", { platformName: r }, " account. Please link the ", { platformName: r }, " account previously linked to this account :", " ", { displayName: d }, " ( ", { platformUserId: p }, " )."));
  }
  if (e) {
    const r = c.getPlatformName(e.platformId);
    return /* @__PURE__ */ t.createElement(n, { className: "mb-6", type: o.danger, onDismiss: a }, /* @__PURE__ */ t.createElement(i, { i18nKey: "LinkedAccountPage.linkConflictError" }, "That ", { platformName: r }, " account is already linked with another AccelByte account.", /* @__PURE__ */ t.createElement("br", null), " Please unlink it first or try linking a different ", { platformName: r }, " account."));
  }
  return l ? /* @__PURE__ */ t.createElement(n, { type: o.danger, className: "alert", onDismiss: a }, /* @__PURE__ */ t.createElement(y, { error: l })) : null;
};
export {
  k as L
};
