"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("./services/main.js");
const roomService = require("./services/roomService.js");
const index = require("./utils/common/logger/index.js");
require("./locales/index.js");
require("@tencentcloud/tuiroom-engine-js");
require("mitt");
require("./services/manager/roomActionManager.js");
require("@tencentcloud/tui-core");
const common = require("./utils/common.js");
var RoomEvent = /* @__PURE__ */ ((RoomEvent2) => {
  RoomEvent2["ROOM_START"] = "RoomStart";
  RoomEvent2["ROOM_JOIN"] = "RoomJoin";
  RoomEvent2["ROOM_LEAVE"] = "RoomLeave";
  RoomEvent2["ROOM_DISMISS"] = "RoomDestroy";
  RoomEvent2["ROOM_ERROR"] = "RoomError";
  RoomEvent2["KICKED_OUT"] = "KickedOut";
  RoomEvent2["KICKED_OFFLINE"] = "KickedOffline";
  RoomEvent2["USER_SIG_EXPIRED"] = "UserSigExpired";
  RoomEvent2["USER_LOGOUT"] = "UserLogout";
  RoomEvent2["LANGUAGE_CHANGED"] = "LanguageChanged";
  RoomEvent2["THEME_CHANGED"] = "ThemeChanged";
  return RoomEvent2;
})(RoomEvent || {});
var FeatureButton = /* @__PURE__ */ ((FeatureButton2) => {
  FeatureButton2["SwitchTheme"] = "SwitchTheme";
  FeatureButton2["SwitchLayout"] = "LayoutControl";
  FeatureButton2["SwitchLanguage"] = "Language";
  FeatureButton2["FullScreen"] = "FullScreen";
  FeatureButton2["Invitation"] = "InviteControl";
  return FeatureButton2;
})(FeatureButton || {});
class Conference {
  login(params) {
    return roomService.roomService.initRoomKit(params);
  }
  async logout() {
    return roomService.roomService.logOut();
  }
  getRoomEngine() {
    const roomEngine = roomService.roomService.roomEngine.instance;
    if (!roomEngine) {
      index.default.warn("getRoomEngine failed, roomEngine is not exist");
    }
    return roomService.roomService.roomEngine.instance;
  }
  on(eventType, callback) {
    roomService.roomService.on(eventType, callback);
  }
  off(eventType, callback) {
    roomService.roomService.off(eventType, callback);
  }
  async start(roomId, params) {
    return await roomService.roomService.start(roomId, params);
  }
  async join(roomId, params) {
    return await roomService.roomService.join(roomId, params);
  }
  async leave() {
    return await roomService.roomService.leaveRoom();
  }
  async dismiss() {
    return await roomService.roomService.dismissRoom();
  }
  setSelfInfo(options) {
    return roomService.roomService.setSelfInfo(options);
  }
  setLanguage(language) {
    return roomService.roomService.setLanguage(language);
  }
  setTheme(theme) {
    return roomService.roomService.setTheme(common.toTargetTheme(theme));
  }
  disableTextMessaging() {
    roomService.roomService.setComponentConfig({ ChatControl: { visible: false } });
  }
  disableScreenSharing() {
    roomService.roomService.setComponentConfig({ ScreenShare: { visible: false } });
  }
  enableWatermark() {
    roomService.roomService.waterMark.toggleWatermark(true);
  }
  enableVirtualBackground() {
    roomService.roomService.setComponentConfig({ VirtualBackground: { visible: true } });
  }
  enableBasicBeauty() {
    roomService.roomService.setComponentConfig({ BasicBeauty: { visible: true } });
  }
  hideFeatureButton(name) {
    roomService.roomService.setComponentConfig({ [name]: { visible: false } });
  }
  replaceFriendList(userList) {
    return roomService.roomService.scheduleConferenceManager.replaceFriendList(userList);
  }
}
const conference = new Conference();
exports.FeatureButton = FeatureButton;
exports.RoomEvent = RoomEvent;
exports.conference = conference;
