"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "LocalProvider", {
    enumerable: true,
    get: function() {
        return LocalProvider;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = require("react");
const _reactintl = require("react-intl");
const _enUS = require("./locale/en-US");
const LocalProvider = (props)=>{
    const { messages, locale = "en", defaultLocale = "en" } = props;
    const mergeMsgs = (0, _react.useMemo)(()=>{
        return {
            ..._enUS.en,
            ...messages
        };
    }, [
        messages,
        locale,
        defaultLocale
    ]);
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactintl.IntlProvider, {
        messages: mergeMsgs,
        locale: locale,
        defaultLocale: defaultLocale,
        children: props.children
    });
};

//# sourceMappingURL=localProvider.js.map