import { defineComponent, unref, openBlock, createElementBlock, createVNode, createCommentVNode } from "vue";
import IconButton from "../../common/base/IconButton.vue.mjs";
import MoreIcon from "../../common/icons/MoreIcon.vue.mjs";
import useControl from "./useMoreControlHooks.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";
const _hoisted_1 = {
  key: 0,
  class: "more-control-container"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "MoreControlPC",
  setup(__props) {
    const moreControlConfig = roomService.getComponentConfig("MoreControl");
    const { t, basicStore, sidebarName } = useControl();
    function toggleMoreSidebar() {
      if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === "more") {
        basicStore.setSidebarOpenStatus(false);
        basicStore.setSidebarName("");
        return;
      }
      basicStore.setSidebarOpenStatus(true);
      basicStore.setSidebarName("more");
    }
    return (_ctx, _cache) => {
      return unref(moreControlConfig).visible ? (openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(IconButton, {
          "is-active": unref(sidebarName) === "more",
          title: unref(t)("More"),
          icon: MoreIcon,
          onClickIcon: toggleMoreSidebar
        }, null, 8, ["is-active", "title"])
      ])) : createCommentVNode("", true);
    };
  }
});
export {
  _sfc_main as default
};
