"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
function _format(message, args) {
  let result;
  if (args.length === 0) {
    result = message;
  } else {
    result = message.replace(/\{(\d+)\}/g, function(match, rest) {
      const index = rest[0];
      return typeof args[index] !== "undefined" ? args[index] : match;
    });
  }
  return result;
}
function localize(data, message, ...args) {
  return _format(message, args);
}
exports.localize = localize;
