import { defineComponent as b, useCssVars as E, ref as M, onMounted as O, watch as V, createElementBlock as p, openBlock as e, createElementVNode as n, Fragment as d, renderList as u, normalizeClass as g, createCommentVNode as k, toDisplayString as _, normalizeStyle as D } from "vue";
import "../../text-text-basic/index.mjs";
import "../../text-table-basic/index.mjs";
import "../../chart-other-gauge/index.mjs";
import "../../chart-other-gauge-stage/index.mjs";
import "../../chart-other-gauge-grade/index.mjs";
import "../../chart-other-word-cloud/index.mjs";
import "../../chart-other-liquidfill/index.mjs";
import "../../chart-other-funnel/index.mjs";
import "../../chart-other-force/index.mjs";
import "../../chart-other-radar/index.mjs";
import "../../chart-other-funnel-split/index.mjs";
import "../../chart-other-funnel-contrast/index.mjs";
import "../../chart-other-candlestick-basic/index.mjs";
import "../../chart-other-candlestick-shanghai/index.mjs";
import "../../chart-other-candlestick-demo/index.mjs";
import "../../chart-other-heatmap/index.mjs";
import "../../chart-other-force2/index.mjs";
import "../../chart-other-graph-basic/index.mjs";
import "../../chart-other-graph-basic2/index.mjs";
import "../../chart-other-graph-calendar/index.mjs";
import "../../chart-other-tree-line/index.mjs";
import "../../chart-other-treemap-basic/index.mjs";
import "../../chart-other-sunburst-basic/index.mjs";
import "../../chart-other-sunburst-basic2/index.mjs";
import "../../chart-other-sunburst-basic3/index.mjs";
import "../../chart-other-sunburst-basic4/index.mjs";
import "../../chart-other-sunburst-book/index.mjs";
import "../../chart-other-sunburst-radius/index.mjs";
import "../../chart-other-sunburst-flavors/index.mjs";
import "../../chart-other-parallel-basic/index.mjs";
import "../../chart-other-parallel-mul/index.mjs";
import "../../chart-other-circular-graph/index.mjs";
import "../../map-earth-basic/index.mjs";
import "../../map-earth-cool-tech/index.mjs";
import "../../map-earth-particle/index.mjs";
import "../../map-earth-hacker/index.mjs";
import "../../map-earth-fly-line/index.mjs";
import "../../chart-other-grid-percentage/index.mjs";
import "../../chart-other-radar-stack/index.mjs";
import "../../chart-other-funnel2/index.mjs";
import "../../chart-other-label-gauge/index.mjs";
import "../../chart-other-theme-river/index.mjs";
import "../../chart-other-tree/index.mjs";
import "../../chart-other-treemap/index.mjs";
import "../../commons-product-model/index.mjs";
import "../../commons-vr-photo/index.mjs";
import "../../commons-vr-video/index.mjs";
import "../../commons-three-loader/index.mjs";
import "../../commons-three-loader3/index.mjs";
import "../../commons-loop-iterator/index.mjs";
import "../../commons-gaussian-splatting-view/index.mjs";
import "../../commons-babylon/index.mjs";
import "../../commons-svg/index.mjs";
import "../../commons-weather/index.mjs";
import "../../commons-weather-dynamic/index.mjs";
import "../../media-wavesurfer/index.mjs";
import "../../interaction-tabs/index.mjs";
import "../../interaction-tabs2/index.mjs";
import "../../interaction-button/index.mjs";
import "../../interaction-button-image/index.mjs";
import "../../interaction-select/index.mjs";
import "../../interaction-input/index.mjs";
import "../../interaction-radio/index.mjs";
import "../../interaction-slider/index.mjs";
import "../../interaction-switch/index.mjs";
import "../../interaction-data-picker/index.mjs";
import "../../interaction-button-refresh/index.mjs";
import "../../media-image/index.mjs";
import "../../text-title/index.mjs";
import "../../commons-qrcode/index.mjs";
import "../../media-video/index.mjs";
import "../../media-audio/index.mjs";
import "../../text-real-time/index.mjs";
import "../../media-carousel/index.mjs";
import "../../media-carousel-slides/index.mjs";
import "../../media-iframe-carousel/index.mjs";
import "../../media-iframe/index.mjs";
import "../../media-m3u8/index.mjs";
import "../../media-m3u8-dynamic/index.mjs";
import "../../media-audio-dynamic/index.mjs";
import "../../media-video-dynamic/index.mjs";
import "../../media-image-dynamic/index.mjs";
import "../../media-iframe-dynamic/index.mjs";
import "../../media-flv/index.mjs";
import "../../commons-echarts/index.mjs";
import "../../text-over-number/index.mjs";
import "../../text-table-scroll/index.mjs";
import "../../text-carousel/index.mjs";
import "../../text-row-scroll/index.mjs";
import "../../text-text-dynamic/index.mjs";
import "../../text-count-down/index.mjs";
import "../../graphical-circle/index.mjs";
import "../../graphical-diamond/index.mjs";
import "../../graphical-hexagon/index.mjs";
import "../../graphical-isosceles-triangle/index.mjs";
import "../../graphical-pentagon/index.mjs";
import "../../graphical-rect/index.mjs";
import "../../graphical-right-triangle/index.mjs";
import "../../scene-map3d/index.mjs";
import "../../scene-amap2d/index.mjs";
import "../../scene-amap3d/index.mjs";
import "../../scene-vr/index.mjs";
import "../../scene-unity-iframe/index.mjs";
import "../../scene-unity-webgl/index.mjs";
import "../../scene-ue-iframe/index.mjs";
import "../../scene-ue-shj/index.mjs";
import "../../scene-default/index.mjs";
import "../../interaction/tabs/index.mjs";
import "../../interaction/tabs-icon/index.mjs";
import "../../interaction/button/index.mjs";
import "../../interaction/date-picker/src/date-picker/index.mjs";
import "../../interaction/date-picker/src/date-picker-range/index.mjs";
import "../../text/list/index.mjs";
import "../../chart/src/bar/basic/index.mjs";
import "../../chart/src/bar/animation/index.mjs";
import "../../chart/src/bar/contrast/index.mjs";
import "../../chart/src/bar/contrast2/index.mjs";
import "../../chart/src/bar/contrast3/index.mjs";
import "../../chart/src/bar/gradient-column-chart/index.mjs";
import "../../chart/src/bar/horizontal/index.mjs";
import "../../chart/src/bar/horizontal-stack/index.mjs";
import "../../chart/src/bar/line-bar/index.mjs";
import "../../chart/src/bar/line-bar2/index.mjs";
import "../../chart/src/bar/loop/index.mjs";
import "../../chart/src/bar/mini/index.mjs";
import "../../chart/src/bar/polar/index.mjs";
import "../../chart/src/bar/polar-stack/index.mjs";
import "../../chart/src/bar/polar2/index.mjs";
import "../../chart/src/bar/radius-circle/index.mjs";
import "../../chart/src/bar/rank/index.mjs";
import "../../chart/src/bar/segmented-progress/index.mjs";
import "../../chart/src/bar/spire/index.mjs";
import "../../chart/src/bar/stack/index.mjs";
import "../../chart/src/bar/stack-line/index.mjs";
import "../../chart/src/bar/stack2/index.mjs";
import "../../chart/src/bar/stack3/index.mjs";
import "../../chart/src/bar/staggered/index.mjs";
import "../../chart/src/bar/three/index.mjs";
import "../../chart/src/bar/waterfall/index.mjs";
import "../../chart/src/bar/zebra/index.mjs";
import "../../chart/src/line/area-gradient/index.mjs";
import "../../chart/src/line/area-highlight/index.mjs";
import "../../chart/src/line/area-highlight2/index.mjs";
import "../../chart/src/line/basic/index.mjs";
import "../../chart/src/line/bump/index.mjs";
import "../../chart/src/line/dashed/index.mjs";
import "../../chart/src/line/ladder/index.mjs";
import "../../chart/src/line/logarithm/index.mjs";
import "../../chart/src/line/multix/index.mjs";
import "../../chart/src/line/polar-double/index.mjs";
import "../../chart/src/line/rain-flow/index.mjs";
import "../../chart/src/line/scale/index.mjs";
import "../../chart/src/line/smooth/index.mjs";
import "../../chart/src/line/smooth-area/index.mjs";
import "../../chart/src/line/stack/index.mjs";
import "../../chart/src/line/stack-area/index.mjs";
import "../../chart/src/line/temp/index.mjs";
import "../../chart/src/line/vertical/index.mjs";
import "../../chart/src/map/basic/index.mjs";
import "../../chart/src/map/bmap-basic/index.mjs";
import "../../chart/src/map/bmap-heatmap/index.mjs";
import "../../chart/src/map/bmap-rich/index.mjs";
import "../../chart/src/map/customize/index.mjs";
import "../../chart/src/map/lines/index.mjs";
import "../../chart/src/map/scatter/index.mjs";
import "../../chart/src/pie/3d/index.mjs";
import "../../chart/src/pie/basic/index.mjs";
import "../../chart/src/pie/basic2/index.mjs";
import "../../chart/src/pie/customized/index.mjs";
import "../../chart/src/pie/index/index.mjs";
import "../../chart/src/pie/interval/index.mjs";
import "../../chart/src/pie/legend-scroll/index.mjs";
import "../../chart/src/pie/radius/index.mjs";
import "../../chart/src/pie/rose/index.mjs";
import "../../chart/src/pie/round/index.mjs";
import "../../chart/src/pie/sunburst/index.mjs";
import "../../chart/src/scatter/basic/index.mjs";
import "../../chart/src/scatter/basic2/index.mjs";
import "../../chart/src/scatter/bubble/index.mjs";
import "../../chart/src/scatter/ripples/index.mjs";
import "../zv-hj-tree-list/index.mjs";
import "../zv-hj-model-resource/index.mjs";
import "./index.mjs";
import "../zv-hj-video-control/index.mjs";
import "../zv-hj-video-page/index.mjs";
import "../zv-hj-password-input/index.mjs";
import "../zv-hj-carousel/index.mjs";
import "../zv-hj-video-monitor/index.mjs";
import "../zv-hj-scene-amap2d/index.mjs";
import "../zv-hj-scene-amap3d/index.mjs";
import "../zv-hj-person-face/index.mjs";
import "../zv-hj-resource-type-phone/index.mjs";
import "../zv-hj-tree-list-phone/index.mjs";
import "../zv-hj-video-page-phone/index.mjs";
import "../zv-hj-model-resource-phone/index.mjs";
import "../zv-hj-bottom-suspend/index.mjs";
import "../zv-hj-pagination/index.mjs";
import "../zv-hj-password-input-phone/index.mjs";
/* empty css                           */
/* empty css                                  */
import { SHJDatasourceV2 as H } from "../../../plugins/datasource/index.mjs";
import { SHJParseEvent as m } from "../../../plugins/event/index.mjs";
import "lodash";
import { HJLYDatasourceApi as I } from "../../../plugins/datasource/hjly/index.mjs";
const L = { class: "hj-one-map-config" }, A = { class: "config__item-top" }, C = ["onClick"], S = ["src"], w = ["src"], x = { class: "config__name" }, z = { class: "config__item-bottom" }, J = ["onClick"], N = ["src"], R = ["src"], T = { class: "config__name" }, j = b({ name: "zv-hj-one-map-config" }), Cr = /* @__PURE__ */ b({
  ...j,
  props: {
    basicOption: {},
    sources: {},
    useEvents: {},
    uuid: {}
  },
  emits: ["on-click", "on-click-map-config-3d", "on-click-map-config-720", "on-click-map-config-hand"],
  setup(h, { expose: v, emit: y }) {
    E((o) => ({
      "1f59c09c": o.basicOption.top.y + "px",
      ef1c1a5a: o.basicOption.top.x + "px",
      "1507adf4": o.basicOption.top.lineHeight + "px",
      f5839f02: o.basicOption.topStyle.fontStyle.marginLeft + "px",
      ea38b3da: o.basicOption.bottom.x + "px",
      "02e0d1c4": o.basicOption.bottom.bottom + "px"
    }));
    const r = h, c = M([]), l = () => {
      H.parse({
        tId: r.uuid,
        sources: r.sources,
        callback: ({ data: o }) => {
          const a = o[0].data[0].data, t = [];
          a.forEach((i) => {
            i.selected = !1, i.id === "announcerFlag" && (i.icon = r.basicOption.announcerFlagIcon), i.id === "funcHandFlag" && (i.icon = r.basicOption.mapFlagIconV1, i.iconActive = r.basicOption.mapFlagIconActiveV1), i.id === "func3dFlag" && (i.icon = r.basicOption.mapFlagIconV2, i.iconActive = r.basicOption.mapFlagIconActiveV2), i.id === "funcVrFlag" && (i.icon = r.basicOption.mapFlagIconV3, i.iconActive = r.basicOption.mapFlagIconActiveV3), t.push(i);
          }), c.value = t;
        }
      });
    };
    O(() => {
      l();
    }), V(
      () => r.sources,
      () => {
        l();
      },
      { deep: !0 }
    );
    const s = y, f = (o) => {
      o.selected = !o.selected;
      const a = o.id;
      switch (a) {
        case "hotFlag":
          o.selected ? o.type = "loadHeatMap" : o.type = "hideHeatMap";
          break;
        case "aiFlag":
          break;
        case "sandTableFlag":
          o.selected ? o.type = "showSmallMap" : o.type = "hideSmallMap";
          break;
        case "cruiseFlag":
          o.selected ? o.type = "loadLineMap" : o.type = "hideLineMap";
          break;
        case "specialFlag":
          break;
        case "compassFlag":
          break;
        case "alarmFlag":
          break;
        case "realRoadFlag":
          o.selected ? o.type = "showRoadMap" : o.type = "hideRoadMap";
          break;
        case "resourceNameFlag":
          o.selected ? o.type = "showDotLabelMap" : o.type = "hideDotLabelMap";
          break;
        case "announcerFlag":
          break;
        case "funcHandFlag":
          o.selected && c.value.forEach((t) => {
            (t.id === "func3dFlag" || t.id === "funcVrFlag") && (t.selected = !1);
          });
          break;
        case "func3dFlag":
          o.selected && c.value.forEach((t) => {
            (t.id === "funcHandFlag" || t.id === "funcVrFlag") && (t.selected = !1);
          });
          break;
        case "funcVrFlag":
          o.selected && c.value.forEach((t) => {
            (t.id === "funcHandFlag" || t.id === "func3dFlag") && (t.selected = !1);
          });
          break;
        // todo测试数据
        case "loadDotMap":
          o.selected ? o.type = "loadDotMap" : o.type = "clearDotMap";
          break;
        case "dotlayers":
          o.selected ? o.type = "dotlayers" : o.type = "clearDotMap";
          break;
        case "scatter":
          o.selected ? o.type = "scatter" : o.type = "clearDotMap";
          break;
        case "labelsLayer":
          o.selected ? o.type = "labelsLayer" : o.type = "clearDotMap";
          break;
      }
      a === "hotFlag" && o.selected ? I.loadHeatMap({}).then((t) => {
        o.data = t.data, s("on-click", o), m.parseEvents(r.useEvents, "on-click", o);
      }) : a === "func3dFlag" ? (s("on-click-map-config-3d", o), m.parseEvents(r.useEvents, "on-click-map-config-3d", o)) : a === "funcVrFlag" ? (s("on-click-map-config-720", o), m.parseEvents(r.useEvents, "on-click-map-config-720", o)) : a === "funcHandFlag" ? (s("on-click-map-config-hand", o), m.parseEvents(r.useEvents, "on-click-map-config-hand", o)) : (s("on-click", o), m.parseEvents(r.useEvents, "on-click", o));
    };
    return v({
      refresh: () => l(),
      refreshData: () => l()
    }), (o, a) => (e(), p("div", L, [
      n("div", A, [
        (e(!0), p(d, null, u(c.value, (t, i) => (e(), p("div", {
          key: i,
          class: g(["config__item", [t.selected ? "config__active" : "", t.id]])
        }, [
          t.icon ? k("", !0) : (e(), p("div", {
            key: 0,
            onClick: (F) => f(t)
          }, [
            t.selected ? (e(), p("img", {
              key: 0,
              class: "config__select",
              src: o.basicOption.selectIconTop,
              alt: ""
            }, null, 8, S)) : (e(), p("img", {
              key: 1,
              class: "config__un-select",
              src: o.basicOption.unSelectIconTop,
              alt: ""
            }, null, 8, w)),
            n("span", x, _(t.name), 1)
          ], 8, C))
        ], 2))), 128))
      ]),
      n("div", z, [
        (e(!0), p(d, null, u(c.value, (t, i) => (e(), p(d, null, [
          t.icon ? (e(), p("div", {
            key: i,
            class: g(["config__item", [t.selected ? "config__active" : "", t.id]]),
            onClick: (F) => f(t)
          }, [
            n("div", null, [
              t.id === "announcerFlag" ? (e(), p("div", {
                key: 0,
                class: "config__person",
                style: D({ backgroundImage: "url(" + t.icon + ")" })
              }, null, 4)) : (e(), p(d, { key: 1 }, [
                t.selected && t.iconActive ? (e(), p("img", {
                  key: 0,
                  class: "config__select",
                  src: t.iconActive,
                  alt: ""
                }, null, 8, N)) : (e(), p("img", {
                  key: 1,
                  class: "config__un-select",
                  src: t.icon,
                  alt: ""
                }, null, 8, R))
              ], 64)),
              n("span", T, _(t.name), 1)
            ])
          ], 10, J)) : k("", !0)
        ], 64))), 256))
      ])
    ]));
  }
});
export {
  Cr as default
};
