var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
  return value;
};
import { echartOptionProfixHandle } from "../../../../public/chart.mjs";
import { PublicConfigClass } from "../../../../public/publicConfig.mjs";
import { PieCommonConfig } from "./index.mjs";
import cloneDeep from "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/cloneDeep.mjs";
import dataJson from "./data.json.mjs";
const includes = ["legend"];
var PieTypeEnum = /* @__PURE__ */ ((PieTypeEnum2) => {
  PieTypeEnum2["NORMAL"] = "常规图";
  PieTypeEnum2["RING"] = "环形图";
  PieTypeEnum2["ROSE"] = "玫瑰图";
  return PieTypeEnum2;
})(PieTypeEnum || {});
const PieTypeObject = {
  [
    "常规图"
    /* NORMAL */
  ]: "nomal",
  [
    "环形图"
    /* RING */
  ]: "ring",
  [
    "玫瑰图"
    /* ROSE */
  ]: "rose"
};
const otherConfig = {
  // 轮播动画
  isCarousel: false
};
const option = {
  ...otherConfig,
  type: "ring",
  tooltip: {
    show: true,
    trigger: "item"
  },
  legend: {
    show: true
  },
  dataset: { ...dataJson },
  series: [
    {
      type: "pie",
      radius: ["40%", "65%"],
      center: ["50%", "60%"],
      roseType: false,
      avoidLabelOverlap: false,
      itemStyle: {
        show: true,
        borderRadius: 10,
        borderColor: "#fff",
        borderWidth: 2
      },
      label: {
        show: false,
        position: "center",
        formatter: "{b}",
        fontSize: 12
      },
      emphasis: {
        label: {
          show: true,
          fontSize: "40",
          fontWeight: "bold"
        }
      },
      labelLine: {
        show: false
      }
    }
  ]
};
class Config extends PublicConfigClass {
  constructor() {
    super(...arguments);
    __publicField(this, "key", PieCommonConfig.key);
    __publicField(this, "chartConfig", cloneDeep(PieCommonConfig));
    // 图表配置项
    __publicField(this, "option", echartOptionProfixHandle(option, includes));
  }
}
export {
  PieTypeEnum,
  PieTypeObject,
  Config as default,
  includes
};
