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
};
