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