import { ref as v, watch as y, resolveComponent as d, openBlock as _, createElementBlock as p, createElementVNode as u, createVNode as c, Fragment as g, renderList as x, unref as L, toDisplayString as V, inject as k, withCtx as f, createTextVNode as C, pushScopeId as I, popScopeId as S } from "vue";
import { _ as B, u as N } from "./DashboardPlugin-1aa3a071.js";
import { D as w } from "./Model-15b5d631.js";
const D = { class: "branch-slider-wrap" }, $ = { class: "branch-slider-block" }, j = { class: "branch-slider-label" }, z = {
  __name: "BranchSlider",
  props: {
    dataList: {
      type: Array,
      required: !1
    }
  },
  emits: ["onValueChange"],
  setup(a, { emit: m }) {
    const n = a, h = m;
    let l = /* @__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"]
    ]);
    n.dataList && n.dataList.length > 0 && (l.clear(), n.dataList.forEach((e, t) => {
      l.set(t, e);
    }));
    const s = v(8), o = (e) => l.get(e);
    return y(s, (e) => {
      h("onValueChange", l.get(e));
    }), (e, t) => {
      const r = d("el-slider");
      return _(), p("div", D, [
        u("div", $, [
          c(r, {
            modelValue: s.value,
            "onUpdate:modelValue": t[0] || (t[0] = (i) => s.value = i),
            vertical: "",
            min: 1,
            max: 8,
            placement: "left",
            "format-tooltip": o
          }, null, 8, ["modelValue"])
        ]),
        u("div", j, [
          (_(!0), p(g, null, x(L(l), (i) => (_(), p("li", null, V(i[1]), 1))), 256))
        ])
      ]);
    };
  }
}, A = /* @__PURE__ */ B(z, [["__scopeId", "data-v-f3b7ad27"]]);
const E = (a) => (I("data-v-48fabc3c"), a = a(), S(), a), M = /* @__PURE__ */ E(() => /* @__PURE__ */ u("div", { class: "fill" }, null, -1)), O = { class: "branch-slider" }, T = {
  __name: "LocationNav",
  props: {
    dataList: {
      type: Array,
      required: !1
    }
  },
  setup(a) {
    k("emitter");
    const m = N();
    let n = v();
    function h(o) {
      let e = n.value[o].path;
      m.openWidget("BiolucidaViewer", [{ key: "mbfLink", value: e }]);
    }
    function l(o) {
      fetch("./dataByLocation.json").then((e) => e.json()).then(
        (e) => s(Object.assign(new w(e)).Imgs)
      );
    }
    function s(o) {
      let e = [];
      o.forEach((t) => {
        let r = {
          name: t.ImgName,
          size: "...",
          path: t.Path
        };
        e.push(r);
      }), n.value = e;
    }
    return (o, e) => {
      const t = d("el-table-column"), r = d("el-button"), i = d("el-table");
      return _(), p(g, null, [
        M,
        u("div", O, [
          c(A, {
            dataList: a.dataList,
            onOnValueChange: e[0] || (e[0] = (b) => l())
          }, null, 8, ["dataList"])
        ]),
        c(i, {
          data: L(n),
          class: "table-of-images"
        }, {
          default: f(() => [
            c(t, {
              prop: "name",
              label: "Name"
            }),
            c(t, {
              prop: "size",
              label: "Size"
            }),
            c(t, {
              fixed: "right",
              label: "Img"
            }, {
              default: f((b) => [
                c(r, {
                  link: "",
                  type: "primary",
                  size: "small",
                  onClick: (q) => h(b.$index)
                }, {
                  default: f(() => [
                    C("Open")
                  ]),
                  _: 2
                }, 1032, ["onClick"])
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["data"])
      ], 64);
    };
  }
}, H = /* @__PURE__ */ B(T, [["__scopeId", "data-v-48fabc3c"]]);
export {
  H as default
};
