import { useContext, useMemo } from 'react';
import { LocaleContext } from './LocaleContext.js';
export var useLocaleForControl = function (controlName, localeHelper) {
    var _a = useContext(LocaleContext), locale = _a.locale, langCode = _a.langCode;
    var localeFromContext = locale === null || locale === void 0 ? void 0 : locale[controlName];
    return useMemo(function () { return Object.assign({}, localeHelper.get(langCode), localeFromContext); }, [langCode, localeFromContext]);
};
//# sourceMappingURL=useLocaleForControl.js.map