import { defineComponent as s, computed as i, watch as p, openBlock as f, createBlock as h, unref as n, normalizeStyle as l } from "vue";
import m from "../../../NComponents/echartsContainer/EchartsContainer.mjs";
const u = s({ name: "EPieCommon" }), d = /* @__PURE__ */ s({
  ...u,
  props: {
    themeColor: {
      type: Object,
      required: !1
    },
    themeSetting: {
      type: Object,
      required: !1
    },
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(o) {
    const e = o, a = i(() => e.chartConfig.option), c = i(() => ({
      height: e.chartConfig.attr.h,
      width: e.chartConfig.attr.w
    }));
    return p(
      () => e.chartConfig.option.type,
      (t) => {
        try {
          t === "nomal" ? (e.chartConfig.option.series[0].radius = "70%", e.chartConfig.option.series[0].roseType = !1) : t === "ring" ? (e.chartConfig.option.series[0].radius = ["40%", "65%"], e.chartConfig.option.series[0].roseType = !1) : (e.chartConfig.option.series[0].radius = "70%", e.chartConfig.option.series[0].roseType = !0);
        } catch (r) {
          console.log(r);
        }
      },
      { deep: !1, immediate: !0 }
    ), (t, r) => (f(), h(m, {
      options: n(a),
      style: l(n(c)),
      theme: o.themeColor
    }, null, 8, ["options", "style", "theme"]));
  }
});
export {
  d as default
};
