import { jsx } from 'react/jsx-runtime';
import { useMemo } from 'react';
import { a as useTranslations, L as LocalizationContext } from './LocalizationContext-UsmB5mnR.js';
import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-CB_zHDbW.js';

const LocalizationProvider = (props) => {
  const { layoutStyles, componentProps } = useLayoutPropsUtil(props);
  const { children, translationData, style, ...rest } = componentProps;
  const { locale = "en", dir, translations } = translationData;
  const styleCombined = { ...style, ...layoutStyles };
  const { translations: t } = useTranslations(translations);
  const value = useMemo(() => ({ t, locale }), [locale, t]);
  return /* @__PURE__ */ jsx(LocalizationContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { style: styleCombined, ...rest, dir, children }) });
};

export { LocalizationProvider as L };
//# sourceMappingURL=LocalizationProvider-CO8fQGqs.js.map
