"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util = require("util");
const ramda_1 = require("ramda");
const i18nJson = require('../../../i18n/en_wiz.json');
class I18n {
    static info(code, ...restArgs) {
        return getMessage(i18nJson.info, code, restArgs);
    }
    static error(code, ...restArgs) {
        return getMessage(i18nJson.error, code, restArgs);
    }
}
exports.default = I18n;
function getMessage(source, code, args) {
    return ramda_1.compose(format(args), ramda_1.defaultTo(code), ramda_1.prop(code))(source);
}
function format(args) {
    return (input) => util.format(input, ...args);
}
//# sourceMappingURL=index.js.map