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)

26 lines (25 loc) 978 B
import { jsx as u } from "../../external/preact/jsx-runtime/dist/jsxRuntime.module.js"; import { toChildArray as d } from "../../external/preact/dist/preact.module.js"; import { useMemo as e, useEffect as p } from "../../external/preact/hooks/dist/hooks.module.js"; import { CoreContext as y } from "./CoreContext.js"; import C from "../../hooks/useBooleanState.js"; import x from "../Localization/Localization.js"; const z = ({ i18n: o = new x().i18n, children: a, commonProps: r, loadingContext: t, updateCore: s, externalErrorHandler: m, componentRef: n }) => { const [c, f] = C(!1), i = e(() => r || {}, [r]), l = e(() => t ?? "", [t]); return p(() => { (async () => { await (o == null ? void 0 : o.ready), f(!0); })().catch(); }, []), c ? /* @__PURE__ */ u(y.Provider, { value: { i18n: o, commonProps: i, loadingContext: l, updateCore: s, externalErrorHandler: m, componentRef: n }, children: d(a) }) : null; }; export { z as default };