import { defineComponent, openBlock, createElementBlock, unref, withDirectives, createBlock, createCommentVNode, createVNode } from "vue";
import AudioControl from "../AudioControl.vue.mjs";
import VideoControl from "../VideoControl.vue.mjs";
import _sfc_main$3 from "../ManageMemberControl.vue.mjs";
import _sfc_main$1 from "../ChatControl.vue.mjs";
import _sfc_main$2 from "../ManageStageControl.vue.mjs";
import MemberApplyControl from "../ApplyControl/MemberApplyControl.vue.mjs";
import MoreControl from "../MoreControl/index.mjs";
import bus from "../../../hooks/useMitt.mjs";
import vTap from "../../../directives/vTap.mjs";
import useRoomFooter from "./useRoomFooterHooks.mjs";
const _hoisted_1 = { class: "footer-container" };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "indexH5",
  setup(__props) {
    const { roomStore, isMaster, isAdmin, isAudience } = useRoomFooter();
    function handleControlClick(name) {
      bus.emit("experience-communication", name);
    }
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        !unref(isAudience) || unref(isAdmin) ? withDirectives((openBlock(), createBlock(AudioControl, { key: 0 }, null, 512)), [
          [unref(vTap), () => handleControlClick("audioControl")]
        ]) : createCommentVNode("", true),
        !unref(isAudience) || unref(isAdmin) ? withDirectives((openBlock(), createBlock(VideoControl, { key: 1 }, null, 512)), [
          [unref(vTap), () => handleControlClick("videoControl")]
        ]) : createCommentVNode("", true),
        !unref(roomStore).isSpeakAfterTakingSeatMode ? withDirectives((openBlock(), createBlock(_sfc_main$1, { key: 2 }, null, 512)), [
          [unref(vTap), () => handleControlClick("chatControl")]
        ]) : createCommentVNode("", true),
        unref(roomStore).isSpeakAfterTakingSeatMode && (unref(isMaster) || unref(isAdmin)) ? withDirectives((openBlock(), createBlock(_sfc_main$2, { key: 3 }, null, 512)), [
          [unref(vTap), () => handleControlClick("MasterApplyControl")]
        ]) : createCommentVNode("", true),
        unref(roomStore).isSpeakAfterTakingSeatMode && !unref(isMaster) ? withDirectives((openBlock(), createBlock(MemberApplyControl, { key: 4 }, null, 512)), [
          [unref(vTap), () => handleControlClick("MemberApplyControl")]
        ]) : createCommentVNode("", true),
        withDirectives(createVNode(_sfc_main$3, null, null, 512), [
          [unref(vTap), () => handleControlClick("manageMemberControl")]
        ]),
        withDirectives(createVNode(unref(MoreControl), null, null, 512), [
          [unref(vTap), () => handleControlClick("moreControl")]
        ])
      ]);
    };
  }
});
export {
  _sfc_main as default
};
