import { defineComponent, defineAsyncComponent, openBlock, createElementBlock, createVNode, unref } from "vue";
import { TUIStore, StoreName, TUIConversationService } from "@tencentcloud/chat-uikit-engine";
import TUIChatKit from "../ChatKit/server.mjs";
import "../../../services/main.mjs";
import { roomService } from "../../../services/roomService.mjs";
import "../../../locales/index.mjs";
import "@tencentcloud/tuiroom-engine-js";
import "mitt";
import "../../../services/manager/roomActionManager.mjs";
import "@tencentcloud/tui-core";
import { hideTUIChatFeatures } from "../ChatKit/components/TUIChat/config.mjs";
import { useBasicStore } from "../../../stores/basic.mjs";
const _hoisted_1 = { class: "chat-container" };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "indexPC",
  setup(__props) {
    const TUIChat = defineAsyncComponent(
      () => import("../ChatKit/components/TUIChat/index.mjs")
    );
    const basicStore = useBasicStore();
    const defaultHideFeaturesButtons = [
      "InputFace",
      "InputVoice",
      "InputEvaluation",
      "InputQuickReplies",
      "InputMention",
      "QuoteMessage",
      "ForwardMessage",
      "TranslateMessage",
      "VoiceToText",
      "EmojiReaction",
      "MultiSelection",
      "MessageSearch",
      "ReadStatus"
    ];
    const currentRoomId = `GROUP${basicStore.roomId}`;
    const chatKitServer = new TUIChatKit();
    chatKitServer.init();
    TUIStore.watch(StoreName.CONV, {
      currentConversationID: onCurrentConversationIDUpdate
    });
    function onCurrentConversationIDUpdate(currentConversationID) {
      roomService.chatManager.setChatType(currentConversationID === currentRoomId);
    }
    TUIConversationService.switchConversation(currentRoomId);
    hideTUIChatFeatures(defaultHideFeaturesButtons);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(unref(TUIChat))
      ]);
    };
  }
});
export {
  _sfc_main as default
};
