"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const index = require("./MemberItem/index.js");
const index$1 = require("../common/base/Dialog/index.js");
const useIndexHooks = require("./useIndexHooks.js");
const pinia = require("pinia");
const room = require("../../stores/room.js");
const SvgIcon = require("../common/base/SvgIcon.vue.js");
const ApplyTipsIcon = require("../common/icons/ApplyTipsIcon.vue.js");
const _hoisted_1 = { class: "manage-member-container" };
const _hoisted_2 = { class: "manage-member-header" };
const _hoisted_3 = {
  key: 1,
  class: "apply-on-stage-info"
};
const _hoisted_4 = { class: "apply-info" };
const _hoisted_5 = { class: "member-list-container" };
const _hoisted_6 = { class: "member-list-header" };
const _hoisted_7 = { class: "member-count" };
const _hoisted_8 = { class: "member-list-container" };
const _hoisted_9 = {
  key: 0,
  class: "manage-member-bottom"
};
const _hoisted_10 = { class: "more-control-container" };
const _hoisted_11 = { class: "more-control-container-main" };
const _hoisted_12 = ["onTouchstart"];
const _hoisted_13 = { class: "operate-text" };
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
  __name: "indexH5",
  setup(__props) {
    const roomStore = room.useRoomStore();
    const {
      userNumber,
      applyToAnchorList,
      isMicrophoneDisableForAllUser,
      isCameraDisableForAllUser,
      isGeneralUser
    } = pinia.storeToRefs(roomStore);
    const {
      audioManageInfo,
      videoManageInfo,
      showManageAllUserDialog,
      dialogTitle,
      dialogContent,
      ManageControlType,
      toggleManageAllMember,
      doToggleManageAllMember,
      t,
      alreadyStaged,
      notStaged,
      filteredUserList,
      isOnStateTabActive,
      handleToggleStaged,
      applyToAnchorUserContent,
      showApplyUserList,
      showMoreControl,
      moreControlList,
      toggleClickMoreBtn
    } = useIndexHooks.default();
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, [
        Vue.createElementVNode("div", _hoisted_2, [
          Vue.unref(roomStore).isSpeakAfterTakingSeatMode ? (Vue.openBlock(), Vue.createElementBlock("div", {
            key: 0,
            class: "apply-count",
            onClick: _cache[0] || (_cache[0] = //@ts-ignore
            (...args) => Vue.unref(handleToggleStaged) && Vue.unref(handleToggleStaged)(...args))
          }, [
            Vue.createElementVNode("span", {
              class: Vue.normalizeClass([
                "apply-staged",
                { "apply-count-active": Vue.unref(isOnStateTabActive) }
              ])
            }, Vue.toDisplayString(Vue.unref(alreadyStaged)), 3),
            Vue.createElementVNode("span", {
              class: Vue.normalizeClass([
                "apply-not-stage",
                { "apply-count-active": !Vue.unref(isOnStateTabActive) }
              ])
            }, Vue.toDisplayString(Vue.unref(notStaged)), 3)
          ])) : Vue.createCommentVNode("", true),
          Vue.unref(applyToAnchorList).length > 0 && !Vue.unref(isGeneralUser) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_3, [
            Vue.createVNode(SvgIcon.default, {
              icon: ApplyTipsIcon.default,
              class: "apply-icon"
            }),
            Vue.createElementVNode("div", _hoisted_4, Vue.toDisplayString(Vue.unref(applyToAnchorUserContent)), 1),
            Vue.createElementVNode("div", {
              class: "apply-check",
              onClick: _cache[1] || (_cache[1] = //@ts-ignore
              (...args) => Vue.unref(showApplyUserList) && Vue.unref(showApplyUserList)(...args))
            }, Vue.toDisplayString(Vue.unref(t)("Check")), 1)
          ])) : Vue.createCommentVNode("", true)
        ]),
        Vue.createElementVNode("div", _hoisted_5, [
          Vue.createElementVNode("div", _hoisted_6, [
            Vue.createTextVNode(Vue.toDisplayString(Vue.unref(t)("Member List")) + " ", 1),
            Vue.createElementVNode("span", _hoisted_7, "(" + Vue.toDisplayString(Vue.unref(userNumber)) + Vue.toDisplayString(Vue.unref(t)("members")) + ")", 1)
          ]),
          Vue.createElementVNode("div", _hoisted_8, [
            (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(filteredUserList), (userInfo) => {
              return Vue.openBlock(), Vue.createBlock(Vue.unref(index.default), {
                key: userInfo.userId,
                "user-info": userInfo
              }, null, 8, ["user-info"]);
            }), 128))
          ])
        ]),
        !Vue.unref(isGeneralUser) ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_9, [
          Vue.createElementVNode("div", {
            class: Vue.normalizeClass(["manage-member-button", Vue.unref(isMicrophoneDisableForAllUser) ? "lift-all" : ""]),
            onTouchstart: _cache[2] || (_cache[2] = ($event) => Vue.unref(toggleManageAllMember)(Vue.unref(ManageControlType).AUDIO))
          }, Vue.toDisplayString(Vue.unref(audioManageInfo)), 35),
          Vue.createElementVNode("div", {
            class: Vue.normalizeClass(["manage-member-button", Vue.unref(isCameraDisableForAllUser) ? "lift-all" : ""]),
            onTouchstart: _cache[3] || (_cache[3] = ($event) => Vue.unref(toggleManageAllMember)(Vue.unref(ManageControlType).VIDEO))
          }, Vue.toDisplayString(Vue.unref(videoManageInfo)), 35),
          Vue.createElementVNode("div", {
            class: "manage-member-button",
            onTouchstart: _cache[4] || (_cache[4] = //@ts-ignore
            (...args) => Vue.unref(toggleClickMoreBtn) && Vue.unref(toggleClickMoreBtn)(...args))
          }, [
            Vue.createTextVNode(Vue.toDisplayString(Vue.unref(t)("More")) + " ", 1),
            Vue.withDirectives(Vue.createElementVNode("div", _hoisted_10, [
              Vue.createElementVNode("div", _hoisted_11, [
                (Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(Vue.unref(moreControlList), (item) => {
                  return Vue.openBlock(), Vue.createElementBlock("div", {
                    key: item.type,
                    class: "user-operate-item",
                    onTouchstart: ($event) => item.func(item.type)
                  }, [
                    Vue.createVNode(SvgIcon.default, {
                      icon: item.icon
                    }, null, 8, ["icon"]),
                    Vue.createElementVNode("span", _hoisted_13, Vue.toDisplayString(item.title), 1)
                  ], 40, _hoisted_12);
                }), 128))
              ])
            ], 512), [
              [Vue.vShow, Vue.unref(showMoreControl)]
            ])
          ], 32)
        ])) : Vue.createCommentVNode("", true),
        Vue.createVNode(Vue.unref(index$1.default), {
          modelValue: Vue.unref(showManageAllUserDialog),
          "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => Vue.isRef(showManageAllUserDialog) ? showManageAllUserDialog.value = $event : null),
          title: Vue.unref(dialogTitle),
          width: "480px",
          modal: true,
          "append-to-room-container": true,
          "confirm-button": Vue.unref(t)("Confirm"),
          "cancel-button": Vue.unref(t)("Cancel"),
          onConfirm: Vue.unref(doToggleManageAllMember),
          onCancel: _cache[6] || (_cache[6] = ($event) => showManageAllUserDialog.value = false)
        }, {
          default: Vue.withCtx(() => [
            Vue.createElementVNode("span", null, Vue.toDisplayString(Vue.unref(dialogContent)), 1)
          ]),
          _: 1
        }, 8, ["modelValue", "title", "confirm-button", "cancel-button", "onConfirm"])
      ]);
    };
  }
});
exports.default = _sfc_main;
