import { ref as v, watch as y, resolveComponent as u, openBlock as p, createElementBlock as m, createElementVNode as _, createVNode as s, Fragment as g, renderList as B, unref as L, toDisplayString as x, inject as k, renderSlot as I, withCtx as f, createTextVNode as S, pushScopeId as V, popScopeId as C } from "vue";
import { _ as w, u as N } from "./DashboardPlugin-2e4f6b9c.js";
class $ {
  constructor(c) {
    this.name = c.ImgName, this.size = "...", this.path = c.Path;
  }
}
const j = { class: "branch-slider-wrap" }, z = { class: "branch-slider-block" }, A = { class: "branch-slider-label" }, D = {
  __name: "BranchSlider",
  props: {
    dataList: {
      type: Array,
      required: !1
    }
  },
  emits: ["onValueChange"],
  setup(a, { emit: c }) {
    const l = a, h = c;
    let o = /* @__PURE__ */ new Map([
      [8, "Main Trunk"],
      [7, "Meningeal Branch"],
      [6, "Auricular Branch"],
      [5, "Pharyngeal Branch"],
      [4, "Cardiac Branch"],
      [3, "Gastric Branch"],
      [2, "Celiac Branch"],
      [1, "Heaptic Branch"]
    ]);
    l.dataList && l.dataList.length > 0 && (o.clear(), l.dataList.forEach((e, t) => {
      o.set(t, e);
    }));
    const r = v(8), n = (e) => o.get(e);
    return y(r, (e) => {
      h("onValueChange", o.get(e));
    }), (e, t) => {
      const i = u("el-slider");
      return p(), m("div", j, [
        _("div", z, [
          s(i, {
            modelValue: r.value,
            "onUpdate:modelValue": t[0] || (t[0] = (d) => r.value = d),
            vertical: "",
            min: 1,
            max: 8,
            placement: "left",
            "format-tooltip": n
          }, null, 8, ["modelValue"])
        ]),
        _("div", A, [
          (p(!0), m(g, null, B(L(o), (d) => (p(), m("li", null, x(d[1]), 1))), 256))
        ])
      ]);
    };
  }
}, E = /* @__PURE__ */ w(D, [["__scopeId", "data-v-f3b7ad27"]]);
const M = (a) => (V("data-v-7e29f12d"), a = a(), C(), a), O = { class: "content-header stick-to-top tw-flex tw-flex-row tw-items-center tw-justify-between tw-h-10 tw-p-1" }, T = /* @__PURE__ */ M(() => /* @__PURE__ */ _("div", { class: "fill" }, null, -1)), P = { class: "branch-slider" }, q = {
  __name: "LocationNav",
  props: {
    dataList: {
      type: Array,
      required: !1
    }
  },
  setup(a) {
    k("emitter");
    const c = N();
    let l = v();
    function h(n) {
      let e = l.value[n].path;
      c.openWidget("BiolucidaViewer", [{ key: "mbfLink", value: e }]);
    }
    function o(n) {
      fetch("./dataByLocation.json").then((e) => e.json()).then(
        (e) => r(Object.assign(new $(e)).Imgs)
      );
    }
    function r(n) {
      let e = [];
      n.forEach((t) => {
        let i = {
          name: t.ImgName,
          size: "...",
          path: t.Path
        };
        e.push(i);
      }), l.value = e;
    }
    return (n, e) => {
      const t = u("el-table-column"), i = u("el-button"), d = u("el-table");
      return p(), m(g, null, [
        _("div", O, [
          I(n.$slots, "default", {}, void 0, !0)
        ]),
        T,
        _("div", P, [
          s(E, {
            dataList: a.dataList,
            onOnValueChange: e[0] || (e[0] = (b) => o())
          }, null, 8, ["dataList"])
        ]),
        s(d, {
          data: L(l),
          class: "table-of-images"
        }, {
          default: f(() => [
            s(t, {
              prop: "name",
              label: "Name"
            }),
            s(t, {
              prop: "size",
              label: "Size"
            }),
            s(t, {
              fixed: "right",
              label: "Img"
            }, {
              default: f((b) => [
                s(i, {
                  link: "",
                  type: "primary",
                  size: "small",
                  onClick: (F) => h(b.$index)
                }, {
                  default: f(() => [
                    S("Open")
                  ]),
                  _: 2
                }, 1032, ["onClick"])
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["data"])
      ], 64);
    };
  }
}, U = /* @__PURE__ */ w(q, [["__scopeId", "data-v-7e29f12d"]]);
export {
  U as default
};
