import en from "../translations/en.json";
export function getTranslation(key) {
  const keys = key.split(".");
  let value = window.klevu_ui_translations || en;
  for (const key of keys) {
    if (value.hasOwnProperty(key)) {
      // @ts-ignore
      value = value[key];
    }
    else {
      console.error(`Translation "${key}" not found`);
      return key;
    }
  }
  return value;
}
//# sourceMappingURL=getTranslation.js.map
