"use strict";
const common_vendor = require("../../../common/vendor.js");
const TUIKit_utils_env = require("../../utils/env.js");
class TUIContactServer {
  constructor() {
    common_vendor.R.registerService(common_vendor.E.TUIContact.SERVICE.NAME, this);
    this.onCallParamsMap = /* @__PURE__ */ new Map();
    this.onCallCallbackMap = /* @__PURE__ */ new Map();
    this.constants = common_vendor.E;
  }
  static getInstance() {
    if (!TUIContactServer.instance) {
      TUIContactServer.instance = new TUIContactServer();
    }
    return TUIContactServer.instance;
  }
  getOnCallParams(method) {
    return this.onCallParamsMap.get(method);
  }
  getOnCallCallback(method) {
    return this.onCallCallbackMap.get(method);
  }
  async onCall(method, params, callback) {
    var _a;
    this.onCallParamsMap.set(method, params);
    this.onCallCallbackMap.set(method, callback);
    if (method === common_vendor.E.TUIContact.SERVICE.METHOD.SELECT_FRIEND) {
      common_vendor.Jt.update(common_vendor.o.CUSTOM, "isShowSelectFriendComponent", true);
      TUIKit_utils_env.isUniFrameWork && ((_a = common_vendor.i) == null ? void 0 : _a.reLaunch({
        url: "/TUIKit/components/TUIContact/index"
      }));
    }
  }
}
exports.TUIContactServer = TUIContactServer;
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUIContact/server.js.map
