"use strict";
const common_vendor = require("../../../common/vendor.js");
const TUIKit_index = require("../../index.js");
const initChat = (options) => {
  TUIKit_index.TUIChatKit.init();
  const { chat } = common_vendor.A.getContext();
  if (options && options.conversationID && (chat == null ? void 0 : chat.isReady())) {
    const { conversationID } = options;
    if (!conversationID.startsWith("C2C") && !conversationID.startsWith("GROUP")) {
      common_vendor.index.__f__("warn", "at TUIKit/components/TUIChat/entry-chat-only.ts:22", "conversationID from options is invalid.");
      return;
    }
    common_vendor.Xt.switchConversation(conversationID);
  }
};
const logout = (flag) => {
  if (flag) {
    return common_vendor.A.logout();
  }
  return Promise.resolve();
};
exports.initChat = initChat;
exports.logout = logout;
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUIKit/components/TUIChat/entry-chat-only.js.map
