"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const vue = require("vue");
const uikitBaseComponentVue3 = require("@tencentcloud/uikit-base-component-vue3");
const room = require("tuikit-atomicx-vue3/room");
const { t } = uikitBaseComponentVue3.useUIKit();
const { currentRoom } = room.useRoomState();
var RoomTabKey = /* @__PURE__ */ ((RoomTabKey2) => {
  RoomTabKey2["Chat"] = "chat";
  RoomTabKey2["Barrage"] = "barrage";
  RoomTabKey2["ParticipantList"] = "participantList";
  RoomTabKey2["AIToolsRealtimeMessageList"] = "aiToolsRealtimeMessageList";
  return RoomTabKey2;
})(RoomTabKey || {});
const activeTab = vue.ref(null);
const sidePanelTitle = vue.computed(() => {
  var _a;
  switch (activeTab.value) {
    case "participantList":
      return `${t("Participant.Title", { count: (_a = currentRoom.value) == null ? void 0 : _a.participantCount })}`;
    case "barrage":
    case "chat":
      return t("Chat.Title");
    case "aiToolsRealtimeMessageList":
      return t("AITools.RealtimeMessageList");
    default:
      return "";
  }
});
const toggleSidePanel = (tab) => {
  if (activeTab.value === tab) {
    activeTab.value = null;
  } else {
    activeTab.value = tab;
  }
};
const closePanel = () => {
  activeTab.value = null;
};
function useRoomSidePanel() {
  return {
    activeTab,
    sidePanelTitle,
    toggleSidePanel,
    closePanel
  };
}
exports.RoomTabKey = RoomTabKey;
exports.useRoomSidePanel = useRoomSidePanel;
