import { defineComponent as t, openBlock as u, createElementBlock as d, onMounted as h } from "vue";
const p = { class: "shj-for-ue" }, f = t({ name: "zv-scene-ue-shj" }), m = /* @__PURE__ */ t({
  ...f,
  props: {
    basicOption: {},
    sources: {},
    useEvents: {},
    uuid: {}
  },
  emits: ["ue-scene-on-message"],
  setup(r, { emit: c }) {
    const n = r, i = c;
    return (() => {
      h(() => {
        n.useEvents.length > 0 && n.useEvents.forEach((e) => {
          e && e.receivingMethod && (window.ue.interface[e.receivingMethod] = (s) => {
            try {
              if (!JSON.parse(s).data)
                throw new Error("");
              const o = n.useEvents.filter((a) => a.receivingMethod === e.receivingMethod);
              i("ue-scene-on-message", JSON.parse(s).data), window.SHJParseEvent(o, "ue-scene-on-message", JSON.parse(s).data);
            } catch {
            }
          });
        });
      });
    })(), (e, s) => (u(), d("div", p));
  }
});
export {
  m as default
};
