import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, toDisplayString, createVNode, createCommentVNode } from "vue";
import useRoomInfo from "../RoomHeader/RoomInfo/useRoomInfoHooks.mjs";
import copyIcon from "../common/icons/CopyIcon.vue.mjs";
import SvgIcon from "../common/base/SvgIcon.vue.mjs";
import { isMobile } from "../../utils/environment.mjs";
import { TUIConferenceStatus } from "@tencentcloud/tuiroom-engine-js";
import { useI18n } from "../../locales/index.mjs";
const _hoisted_1 = { class: "detail-title" };
const _hoisted_2 = { class: "detail-info" };
const _hoisted_3 = ["title"];
const _hoisted_4 = ["onClick"];
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "ConferenceDetail",
  props: {
    conferenceInfo: {},
    scheduleRoomDetailList: {}
  },
  setup(__props) {
    const { t } = useI18n();
    const statusMap = {
      [TUIConferenceStatus.kConferenceStatusRunning]: {
        text: "Ongoing",
        className: "status-running"
      }
    };
    const props = __props;
    const { onCopy } = useRoomInfo();
    const getStatusTextAndClass = (status) => {
      if (!status) return { text: "", className: "" };
      return statusMap[status] || { text: "", className: "" };
    };
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", {
        class: normalizeClass(["detail-container", unref(isMobile) ? "h5" : ""])
      }, [
        (openBlock(true), createElementBlock(Fragment, null, renderList(props.scheduleRoomDetailList, (item, index) => {
          return openBlock(), createElementBlock(Fragment, null, [
            item.isVisible ? (openBlock(), createElementBlock("div", {
              class: normalizeClass(["detail-content"]),
              key: index
            }, [
              createElementVNode("span", _hoisted_1, toDisplayString(unref(t)(item.title)), 1),
              createElementVNode("span", _hoisted_2, [
                createElementVNode("span", {
                  class: "detail-item",
                  title: item.content
                }, toDisplayString(item.content), 9, _hoisted_3),
                item.isShowCopyIcon ? (openBlock(), createElementBlock("span", {
                  key: 0,
                  class: "copy-container",
                  onClick: ($event) => unref(onCopy)(item.content)
                }, [
                  createVNode(SvgIcon, {
                    class: "copy",
                    icon: copyIcon
                  })
                ], 8, _hoisted_4)) : createCommentVNode("", true),
                item.isShowStatus ? (openBlock(), createElementBlock("div", {
                  key: 1,
                  class: normalizeClass([
                    "detail-status",
                    getStatusTextAndClass(item.status).className
                  ])
                }, toDisplayString(unref(t)(getStatusTextAndClass(item.status).text)), 3)) : createCommentVNode("", true)
              ])
            ])) : createCommentVNode("", true)
          ], 64);
        }), 256))
      ], 2);
    };
  }
});
export {
  _sfc_main as default
};
