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)

18 lines (17 loc) 833 B
import { jsx as n } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js"; import { toChildArray as i } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/dist/preact.module.js"; import { useEffect as m, useMemo as s } from "../../../external/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js"; import { CoreContext as u } from "./CoreContext.js"; import f from "../../../hooks/useBooleanState.js"; import { waitForI18n as l, createCoreContextValue as c } from "../setupCore.js"; const P = (e) => { const { children: t } = e, [o, r] = f(!1); m(() => { l(e.i18n).then(() => r(!0)); }, [e.i18n, r]); const a = s(() => c(e), [e]); return o ? /* @__PURE__ */ n(u.Provider, { value: a, children: i(t) }) : null; }; export { P as default };