import React, { useMemo } from "react";
const defaultParams = {
  locale: "en-US",
  dateFormat: "MMM D. YYYY",
  timeFormat: "HH:mm a",
  decimalSeparator: ".",
  thousandSeparator: ",",
  decimalRounding: 0,
  decimalSpaces: 2,
  currencyCode: "USD",
  t: value => value
};
export const LocalizationContext = /*#__PURE__*/React.createContext(defaultParams);
export const LocalizationProvider = _ref => {
  let {
    children,
    params
  } = _ref;
  const value = useMemo(() => {
    return {
      ...defaultParams,
      ...params
    };
  }, [params]);
  return /*#__PURE__*/React.createElement(LocalizationContext.Provider, {
    value: value
  }, children);
};
export const useLocalization = () => React.useContext(LocalizationContext);
//# sourceMappingURL=LocalizationProvider.js.map