"use strict";exports.__esModule = true;exports.useLocaleForControl = void 0;var _react = require("react");



var _LocaleContext = require("./LocaleContext");

var useLocaleForControl = exports.useLocaleForControl = function useLocaleForControl(
controlName,
localeHelper)
{
  var _useContext = (0, _react.useContext)(_LocaleContext.LocaleContext),locale = _useContext.locale,langCode = _useContext.langCode;
  var localeFromContext = locale == null ? void 0 : locale[controlName];
  return (0, _react.useMemo)(function () {return Object.assign({}, localeHelper.get(langCode), localeFromContext);}, [langCode, localeFromContext]);
};