import { defineComponent, computed, toRefs, openBlock, createElementBlock, createElementVNode, createVNode, unref, normalizeStyle } from "vue";
import EchartsContainer from "../../../NComponents/echartsContainer/EchartsContainer.mjs";
import _sfc_main$1 from "../../../NComponents/configCommon/refConfig.mjs";
const _hoisted_1 = { style: { "margin-bottom": "20px" } };
const __default__ = defineComponent({ name: "EBarPileup" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    themeColor: {
      type: Object,
      required: false
    },
    chartConfig: {
      type: Object,
      required: true,
      default: () => {
        return {
          option: {
            title: {
              text: "\u6392\u653E\u7C7B\u522B\u8D8B\u52BF\uFF08\u5355\u4F4D\uFF1A\u5428\uFF09",
              textStyle: {
                color: "white",
                fontSize: 28
              },
              left: 20,
              show: false
            },
            tooltip: {
              trigger: "axis",
              axisPointer: {
                type: "shadow"
              }
            },
            legend: {
              bottom: "20",
              itemWidth: 20,
              itemHeight: 20,
              itemGap: 40,
              textStyle: {
                color: "white",
                fontSize: 24,
                width: "15%",
                padding: 5
              }
            },
            grid: {
              left: "3%",
              right: "4%",
              containLabel: true
            },
            xAxis: [
              {
                type: "category",
                data: [
                  "01",
                  "02",
                  "03",
                  "04",
                  "05",
                  "07",
                  "08",
                  "09",
                  "10",
                  "11",
                  "12"
                ],
                axisTick: {
                  show: false
                },
                axisLine: {
                  lineStyle: {
                    color: "white"
                  }
                },
                axisLabel: {
                  color: "rgba(78, 143, 130, 1)",
                  fontSize: 24,
                  padding: 5
                }
              }
            ],
            yAxis: [
              {
                type: "value",
                axisLine: {
                  show: false,
                  lineStyle: {
                    color: "white"
                  }
                },
                axisLabel: {
                  color: "white",
                  fontSize: 22
                }
              }
            ],
            series: [
              {
                name: "\u5DE5\u7A0B\u6E23\u571F",
                type: "bar",
                stack: "email",
                barWidth: 28,
                itemStyle: {
                  normal: { color: "rgba(24, 144, 255, 1)" }
                },
                emphasis: {
                  focus: "series"
                },
                data: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
              },
              {
                name: "\u5DE5\u7A0B\u6CE5\u6D46",
                type: "bar",
                stack: "email",
                barWidth: 28,
                itemStyle: {
                  normal: { color: "rgba(49, 194, 92, 1)" }
                },
                emphasis: {
                  focus: "series"
                },
                data: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
              },
              {
                name: "\u7802\u77F3",
                type: "bar",
                stack: "email",
                barWidth: 28,
                itemStyle: {
                  normal: { color: "rgba(250, 204, 20, 1)" }
                },
                emphasis: {
                  focus: "series"
                },
                data: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
              },
              {
                name: "\u6709\u6BD2\u6709\u5BB3",
                type: "bar",
                stack: "email",
                barWidth: 28,
                itemStyle: {
                  normal: { color: "rgba(255, 255, 255, 1)" }
                },
                emphasis: {
                  focus: "series"
                },
                data: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
              },
              {
                name: "\u6613\u71C3\u6613\u7206",
                type: "bar",
                stack: "email",
                barWidth: 28,
                itemStyle: {
                  normal: { color: "rgba(159, 89, 255, 1)" }
                },
                emphasis: {
                  focus: "series"
                },
                data: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
              },
              {
                name: "\u5176\u4ED6",
                type: "bar",
                stack: "email",
                barWidth: 28,
                itemStyle: {
                  normal: { color: "rgba(19, 194, 194, 1)" }
                },
                emphasis: {
                  focus: "series"
                },
                data: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
              }
            ]
          },
          attr: {
            h: "400px",
            w: "964px"
          },
          titleCofing: {
            text: "\u6392\u653E\u7C7B\u522B\u8D8B\u52BF\uFF08\u5355\u4F4D\uFF1A\u5428\uFF09",
            fontSize: 28,
            color: "white"
          },
          bgStyle: {
            background: "#1C2532",
            border: "1px solid #586A7F"
          }
        };
      }
    }
  },
  setup(__props) {
    const props = __props;
    const option = computed(() => {
      return props.chartConfig.option;
    });
    const { titleCofing, bgStyle } = toRefs(props.chartConfig);
    const style = computed(() => {
      return {
        height: props.chartConfig.attr.h,
        width: props.chartConfig.attr.w
      };
    });
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", null, [
        createElementVNode("div", _hoisted_1, [
          createVNode(_sfc_main$1, {
            config: unref(titleCofing),
            type: "text"
          }, null, 8, ["config"])
        ]),
        createElementVNode("div", {
          style: normalizeStyle(unref(bgStyle))
        }, [
          createVNode(EchartsContainer, {
            options: unref(option),
            theme: __props.themeColor,
            style: normalizeStyle(unref(style))
          }, null, 8, ["options", "theme", "style"])
        ], 4)
      ]);
    };
  }
});
export { _sfc_main as default };
