import { defineComponent as i, computed as n, watch as p, openBlock as h, createElementBlock as d, createVNode as f, unref as a, normalizeStyle as m } from "vue";
import u from "../../../NComponents/echartsContainer/EchartsContainer.mjs";
const g = i({ name: "ERadar" }), _ = /* @__PURE__ */ i({
  ...g,
  props: {
    themeSetting: {
      type: Object,
      required: !1
    },
    themeColor: {
      type: Object,
      required: !1
    },
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(o) {
    const t = o, c = n(() => t.chartConfig.option), s = (e) => {
      e.seriesData && (t.chartConfig.option.series[0].data = e.seriesData, t.chartConfig.option.legend.data = e.seriesData.map((r) => r.name)), e.radarIndicator && (t.chartConfig.option.radar.indicator = e.radarIndicator);
    };
    p(
      () => t.chartConfig.option.dataset,
      (e) => {
        try {
          s(e);
        } catch (r) {
          console.log(r);
        }
      },
      {
        deep: !1
      }
    );
    const l = n(() => ({
      height: t.chartConfig.attr.h,
      width: t.chartConfig.attr.w
    }));
    return (e, r) => (h(), d("div", null, [
      f(u, {
        options: a(c),
        style: m(a(l)),
        theme: o.themeColor
      }, null, 8, ["options", "style", "theme"])
    ]));
  }
});
export {
  _ as default
};
