"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const TUIChatEngine = require("@tencentcloud/chat-uikit-engine");
const server = require("../ChatKit/server.js");
require("../../../services/main.js");
const roomService = require("../../../services/roomService.js");
require("../../../locales/index.js");
require("@tencentcloud/tuiroom-engine-js");
require("mitt");
require("../../../services/manager/roomActionManager.js");
require("@tencentcloud/tui-core");
const config = require("../ChatKit/components/TUIChat/config.js");
const server$1 = require("../ChatKit/components/TUIChat/server.js");
const basic = require("../../../stores/basic.js");
const _hoisted_1 = { class: "chat-container" };
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
  __name: "indexPC",
  setup(__props) {
    const TUIChat = Vue.defineAsyncComponent(
      () => Promise.resolve().then(() => require("../ChatKit/components/TUIChat/index.vue.js"))
    );
    const basicStore = basic.useBasicStore();
    const defaultHideFeaturesButtons = [
      "InputFace",
      "InputVoice",
      "InputEvaluation",
      "InputQuickReplies",
      "InputMention",
      "QuoteMessage",
      "ForwardMessage",
      "TranslateMessage",
      "VoiceToText",
      "EmojiReaction",
      "MultiSelection",
      "MessageSearch",
      "ReadStatus"
    ];
    const currentRoomId = `GROUP${basicStore.roomId}`;
    const chatKitServer = new server.default();
    chatKitServer.init();
    new server$1.default();
    TUIChatEngine.TUIConversationService.switchConversation(currentRoomId);
    config.hideTUIChatFeatures(defaultHideFeaturesButtons);
    roomService.roomService.setTheme(basicStore.defaultTheme);
    roomService.roomService.setLanguage(basicStore.lang);
    TUIChatEngine.TUIStore.watch(TUIChatEngine.StoreName.CONV, {
      currentConversationID: onCurrentConversationIDUpdate
    });
    function onCurrentConversationIDUpdate(currentConversationID) {
      roomService.roomService.chatManager.setChatType(currentConversationID === currentRoomId);
    }
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
        Vue.createVNode(Vue.unref(TUIChat))
      ]);
    };
  }
});
exports.default = _sfc_main;
