import { ref as r, inject as l, onMounted as m, onUnmounted as d, openBlock as u, createElementBlock as _, Fragment as p, renderSlot as f, createElementVNode as n, mergeProps as w, unref as g, pushScopeId as v, popScopeId as b } from "vue";
import { _ as S, u as V } from "./DashboardPlugin-2e4f6b9c.js";
const h = (e) => (v("data-v-98a86275"), e = e(), b(), e), I = /* @__PURE__ */ h(() => /* @__PURE__ */ n("div", { class: "bv-metadata tw-text-left tw-p-1 tw-text-sm" }, null, -1)), x = { class: "tw-h-screen tw-flex tw-justify-center" }, B = ["src"], y = {
  __name: "BiolucidaViewer",
  props: {
    imageID: 0,
    mbfLink: { type: String },
    listening: {
      tyep: Boolean
    }
  },
  emits: ["selectWidget"],
  setup(e, { emit: k }) {
    const c = r("MBF Image Viewer"), s = e, a = l("emitter");
    let i = r(s.mbfLink);
    const t = V();
    return m(() => {
      t.mbfViewerCount++;
    }), d(() => {
      t.mbfViewerCount--;
    }), a.on("ImageSelector-mbfImageSelected", (o) => {
      (t.mbfViewerCount > 1 && s.listening || t.mbfViewerCount == 1) && (i.value = o);
    }), (o, C) => (u(), _(p, null, [
      f(o.$slots, "default", { widgetName: c.value }, void 0, !0),
      n("div", w(o.$attrs, { class: "tw-flex tw-flex-col tw-h-full" }), [
        I,
        n("div", x, [
          n("iframe", {
            class: "tw-p-1 tw-w-screen",
            src: g(i)
          }, null, 8, B)
        ])
      ], 16)
    ], 64));
  }
}, j = /* @__PURE__ */ S(y, [["__scopeId", "data-v-98a86275"]]);
export {
  j as default
};
