import { defineComponent, computed, createBlock, createCommentVNode, openBlock } from "vue";
import { useRoomParticipantState, VideoStreamType } from "tuikit-atomicx-vue3/room";
import LocalScreenViewUI from "./LocalScreenViewUI.vue2.mjs";
import ParticipantViewUI from "./ParticipantViewUI.vue2.mjs";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    participant: {},
    streamType: {}
  },
  setup(__props) {
    const props = __props;
    const { localParticipant } = useRoomParticipantState();
    const isLocalScreen = computed(() => {
      var _a, _b;
      return ((_a = props.participant) == null ? void 0 : _a.userId) === ((_b = localParticipant.value) == null ? void 0 : _b.userId) && props.streamType === VideoStreamType.Screen;
    });
    return (_ctx, _cache) => {
      return isLocalScreen.value ? (openBlock(), createBlock(LocalScreenViewUI, { key: 0 })) : __props.participant ? (openBlock(), createBlock(ParticipantViewUI, {
        key: 1,
        participant: __props.participant,
        "stream-type": __props.streamType
      }, null, 8, ["participant", "stream-type"])) : createCommentVNode("", true);
    };
  }
});
export {
  _sfc_main as default
};
