import _defineProperty from "D:\\progress\\h5\\company\\stc-ui\\node_modules\\@babel\\runtime/helpers/esm/defineProperty";
import Vue from 'vue';
import { deepAssign } from "../utils/deep-assign";
import defaultMessages from "./lang/zh-CN";
var proto = Vue.prototype;
var defineReactive = Vue.util.defineReactive;
defineReactive(proto, '$stcLang', 'zh-CN');
defineReactive(proto, '$stcMessages', {
  'zh-CN': defaultMessages
});
export default {
  messages: function messages() {
    return proto.$stcMessages[proto.$stcLang];
  },
  use: function use(lang, messages) {
    proto.$stcLang = lang;
    this.add(_defineProperty({}, lang, messages));
  },
  add: function add() {
    var messages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
    deepAssign(proto.$stcMessages, messages);
  }
};