import { defineComponent, ref, createElementBlock, openBlock, Fragment, createElementVNode, createBlock, createVNode, unref, withCtx, toDisplayString, Teleport, createCommentVNode } from "vue";
import { useUIKit, Dropdown, IconAIIcon, IconAISubtitles, IconAITranscription } from "@tencentcloud/uikit-base-component-vue3";
import { Subtitle } from "tuikit-atomicx-vue3/room";
import { useRoomSidePanel, RoomTabKey } from "../../hooks/useRoomSidePanel.mjs";
import IconButton from "../base/IconButton.vue2.mjs";
const _hoisted_1 = { class: "operate-list" };
const _hoisted_2 = { class: "operate-item-text" };
const _hoisted_3 = { class: "operate-item-text" };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  setup(__props) {
    const { t } = useUIKit();
    const { activeTab, toggleSidePanel } = useRoomSidePanel();
    const subtitlesVisible = ref(false);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock(Fragment, null, [
        createElementVNode("div", null, [
          createVNode(unref(Dropdown), {
            trigger: "click",
            placement: "top",
            teleported: false
          }, {
            dropdown: withCtx(() => [
              createElementVNode("div", _hoisted_1, [
                createElementVNode("div", {
                  class: "operate-item",
                  onClick: _cache[0] || (_cache[0] = ($event) => subtitlesVisible.value = !subtitlesVisible.value)
                }, [
                  createVNode(unref(IconAISubtitles), { size: 18 }),
                  createElementVNode("span", _hoisted_2, toDisplayString(subtitlesVisible.value ? unref(t)("AITools.SubtitlesClose") : unref(t)("AITools.SubtitlesOpen")), 1)
                ]),
                createElementVNode("div", {
                  class: "operate-item",
                  onClick: _cache[1] || (_cache[1] = ($event) => unref(toggleSidePanel)(unref(RoomTabKey).AIToolsRealtimeMessageList))
                }, [
                  createVNode(unref(IconAITranscription), { size: 18 }),
                  createElementVNode("span", _hoisted_3, toDisplayString(unref(activeTab) === unref(RoomTabKey).AIToolsRealtimeMessageList ? unref(t)("AITools.RealtimeMessageListClose") : unref(t)("AITools.RealtimeMessageListOpen")), 1)
                ])
              ])
            ]),
            default: withCtx(() => [
              createVNode(IconButton, {
                title: unref(t)("AITools.Title")
              }, {
                default: withCtx(() => [
                  createVNode(unref(IconAIIcon), { size: 24 })
                ]),
                _: 1
              }, 8, ["title"])
            ]),
            _: 1
          })
        ]),
        (openBlock(), createBlock(Teleport, { to: "body" }, [
          subtitlesVisible.value ? (openBlock(), createBlock(unref(Subtitle), { key: 0 })) : createCommentVNode("", true)
        ]))
      ], 64);
    };
  }
});
export {
  _sfc_main as default
};
