UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

46 lines (45 loc) 1.36 kB
import { jsx as e } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js"; import { WITH_ERROR_CLASS as c } from "./constants.js"; import { ErrorMessageDisplay as t } from "../ErrorMessageDisplay/ErrorMessageDisplay.js"; import g from "classnames"; import { getErrorMessage as u } from "../../utils/getErrorMessage.js"; import { Fragment as f } from "../../../external/preact/dist/preact.module.js"; import { useConfigContext as h } from "../../../core/ConfigContext/context.js"; function x({ balanceAccountsError: r, children: n, className: a, errorMessage: o, isBalanceAccountIdWrong: i, onContactSupport: s }) { const { hasError: m } = h(); return /* @__PURE__ */ e("div", { className: g(a, { [c]: m }), children: m ? /* @__PURE__ */ e( t, { withImage: !0, centered: !0, title: "somethingWentWrong", message: [o, "tryRefreshingThePageOrComeBackLater"], refreshComponent: !0 } ) : r ? /* @__PURE__ */ e( t, { withImage: !0, centered: !0, ...u(r, "weCouldNotLoadYourBalanceAccounts", s) } ) : i ? /* @__PURE__ */ e( t, { withImage: !0, centered: !0, title: "somethingWentWrong", message: [o, "theSelectedBalanceAccountIsIncorrect"] } ) : /* @__PURE__ */ e(f, { children: n }) }); } export { x as default };