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.43 kB
import { jsx as r } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js"; import { WITH_ERROR_CLASS as c } from "./constants.js"; import { ErrorMessageDisplay as e } from "../ErrorMessageDisplay/ErrorMessageDisplay.js"; import g from "classnames"; import { getErrorMessage as u } from "../../utils/getErrorMessage.js"; import { Fragment as f } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/dist/preact.module.js"; import { useConfigContext as p } from "../../../core/ConfigContext/preact/context.js"; function w({ balanceAccountsError: o, children: n, className: i, errorMessage: t, isBalanceAccountIdWrong: s, onContactSupport: a }) { const { hasError: m } = p(); return /* @__PURE__ */ r("div", { className: g(i, { [c]: m }), children: m ? /* @__PURE__ */ r( e, { withImage: !0, centered: !0, title: "common.errors.somethingWentWrong", message: [t, "common.errors.retry"], refreshComponent: !0 } ) : o ? /* @__PURE__ */ r( e, { withImage: !0, centered: !0, ...u(o, "common.errors.accountUnavailable", a) } ) : s ? /* @__PURE__ */ r( e, { withImage: !0, centered: !0, title: "common.errors.somethingWentWrong", message: [t, "common.errors.accountInvalid"] } ) : /* @__PURE__ */ r(f, { children: n }) }); } export { w as default };