"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.$l = $l;
exports["default"] = void 0;

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

var _formatter = require("../formatter");

function $l(component, key, defaults, injectionOptions) {
  var locale = _LocaleContext["default"].get(component, key, defaults);

  if (injectionOptions) {
    return (0, _formatter.formatTemplate)(locale, injectionOptions);
  }

  return locale;
}

var _default = _LocaleContext["default"];
exports["default"] = _default;
//# sourceMappingURL=index.js.map
