import { defineComponent, unref, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, normalizeClass, Fragment, renderList, createCommentVNode } from "vue";
import useRoomInfo from "./useRoomInfoHooks.mjs";
import SvgIcon from "../../common/base/SvgIcon.vue.mjs";
import ArrowUpIcon from "../../common/icons/ArrowUpIcon.vue.mjs";
import copyIcon from "../../common/icons/CopyIcon.vue.mjs";
import RoomTime from "../../common/RoomTime.vue.mjs";
const _hoisted_1 = {
  key: 0,
  class: "conference-container"
};
const _hoisted_2 = { class: "title-text" };
const _hoisted_3 = { class: "text" };
const _hoisted_4 = {
  key: 0,
  class: "room-info-container"
};
const _hoisted_5 = { class: "room-info-container-main" };
const _hoisted_6 = { class: "room-info-conference-title" };
const _hoisted_7 = { class: "master-header" };
const _hoisted_8 = {
  key: 0,
  class: "room-info-content"
};
const _hoisted_9 = { class: "room-info-title" };
const _hoisted_10 = { class: "room-info-item" };
const _hoisted_11 = ["onClick"];
const _hoisted_12 = {
  key: 0,
  class: "room-info-bottom"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "RoomInfoH5",
  setup(__props) {
    const {
      t,
      isWeChat,
      arrowDirection,
      handleCloseRoomInfo,
      isShowRoomInfo,
      isShowRoomInfoTitle,
      conferenceTitle,
      roomInfoTabList,
      toggleShowRoomInfoStatus,
      onCopy
    } = useRoomInfo();
    return (_ctx, _cache) => {
      return unref(isShowRoomInfoTitle) ? (openBlock(), createElementBlock("div", _hoisted_1, [
        createElementVNode("div", {
          class: "title-container",
          onClick: _cache[0] || (_cache[0] = //@ts-ignore
          (...args) => unref(toggleShowRoomInfoStatus) && unref(toggleShowRoomInfoStatus)(...args))
        }, [
          createElementVNode("div", _hoisted_2, [
            createElementVNode("span", _hoisted_3, toDisplayString(unref(conferenceTitle)), 1),
            createVNode(SvgIcon, {
              class: normalizeClass(["arrow-icon", { "arrow-down-icon": unref(arrowDirection) }]),
              icon: ArrowUpIcon
            }, null, 8, ["class"])
          ]),
          createVNode(RoomTime, { class: "text" })
        ]),
        unref(isShowRoomInfo) ? (openBlock(), createElementBlock("div", _hoisted_4, [
          createElementVNode("div", _hoisted_5, [
            createElementVNode("div", _hoisted_6, [
              createElementVNode("span", _hoisted_7, toDisplayString(unref(conferenceTitle)), 1),
              createElementVNode("span", {
                class: "cancel",
                onClick: _cache[1] || (_cache[1] = //@ts-ignore
                (...args) => unref(handleCloseRoomInfo) && unref(handleCloseRoomInfo)(...args))
              }, toDisplayString(unref(t)("Cancel")), 1)
            ]),
            (openBlock(true), createElementBlock(Fragment, null, renderList(unref(roomInfoTabList), (item) => {
              return openBlock(), createElementBlock("div", {
                key: item.id
              }, [
                item.visible ? (openBlock(), createElementBlock("div", _hoisted_8, [
                  createElementVNode("span", _hoisted_9, toDisplayString(unref(t)(item.title)), 1),
                  createElementVNode("span", _hoisted_10, toDisplayString(item.content), 1),
                  item.isShowCopyIcon && item.visible ? (openBlock(), createElementBlock("div", {
                    key: 0,
                    class: "copy-container",
                    onClick: ($event) => unref(onCopy)(item.copyLink)
                  }, [
                    createVNode(SvgIcon, {
                      class: "copy",
                      icon: copyIcon
                    })
                  ], 8, _hoisted_11)) : createCommentVNode("", true)
                ])) : createCommentVNode("", true)
              ]);
            }), 128)),
            !unref(isWeChat) ? (openBlock(), createElementBlock("div", _hoisted_12, [
              createElementVNode("span", null, toDisplayString(unref(t)(
                "You can share the room number or link to invite more people to join the room."
              )), 1)
            ])) : createCommentVNode("", true)
          ])
        ])) : createCommentVNode("", true)
      ])) : createCommentVNode("", true);
    };
  }
});
export {
  _sfc_main as default
};
