import { defineComponent, ref, toRefs, openBlock, createElementBlock, createElementVNode, Fragment, renderList, unref, createVNode, withCtx } from "vue";
import _sfc_main$1 from "../../../NComponents/configCommon/refConfig.mjs";
import activeImg from "./images/active.mjs";
import defaultImg from "./images/default.mjs";
import "./index.vue_vue_type_style_index_0_scoped_true_lang.mjs";
import _export_sfc from "../../../../_virtual/plugin-vue_export-helper.mjs";
const _hoisted_1 = { class: "lists" };
const _hoisted_2 = ["onClick"];
const _hoisted_3 = { class: "content" };
const __default__ = defineComponent({ name: "EComponent22List" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true,
      default: () => {
        return {
          option: {
            dataset: [
              {
                name: "\u4ECA\u65E5\u6392\u653E",
                num: 372,
                unit: "\u5428"
              },
              {
                name: "\u672C\u6708\u6392\u653E",
                num: 4688,
                unit: "\u5428"
              },
              {
                name: "\u672C\u5E74\u6392\u653E",
                num: 69803,
                unit: "\u5428"
              },
              {
                name: "\u7D2F\u8BA1\u6392\u653E",
                num: 282739,
                unit: "\u5428"
              }
            ],
            nameCofing: {
              fontSize: 28,
              color: "rgb(255, 255, 255)"
            },
            numCofing: {
              fontSize: 40,
              color: "rgb(255, 255, 255)",
              fontFamily: "Bureau Agency FB"
            },
            unitCofing: {
              fontSize: 24,
              color: "rgba(145, 213, 196, 1)"
            },
            defaultConfig: {
              imgSrc: defaultImg,
              width: 213,
              height: 180
            },
            activeConfig: {
              imgSrc: activeImg,
              width: 213,
              height: 180
            }
          }
        };
      }
    }
  },
  setup(__props) {
    const props = __props;
    const active = ref(0);
    const {
      dataset,
      nameCofing,
      numCofing,
      unitCofing,
      defaultConfig,
      activeConfig,
      subTitleCofing
    } = toRefs(props.chartConfig.option);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", null, [
        createElementVNode("div", _hoisted_1, [
          (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dataset), (item, index) => {
            return openBlock(), createElementBlock("div", {
              onClick: ($event) => active.value = index
            }, [
              createVNode(_sfc_main$1, {
                config: index == active.value ? unref(activeConfig) : unref(defaultConfig),
                type: "bgImg",
                class: "list"
              }, {
                default: withCtx(() => [
                  createElementVNode("div", _hoisted_3, [
                    createVNode(_sfc_main$1, {
                      config: { ...unref(nameCofing), text: item.name },
                      type: "text"
                    }, null, 8, ["config"]),
                    createElementVNode("div", null, [
                      createVNode(_sfc_main$1, {
                        config: { ...unref(numCofing), text: item.num },
                        type: "text",
                        class: "numClass"
                      }, null, 8, ["config"]),
                      createVNode(_sfc_main$1, {
                        config: { ...unref(unitCofing), text: item.unit },
                        type: "text"
                      }, null, 8, ["config"])
                    ])
                  ])
                ]),
                _: 2
              }, 1032, ["config"])
            ], 8, _hoisted_2);
          }), 256))
        ])
      ]);
    };
  }
});
var _EComponent22List = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-16672d6d"]]);
export { _EComponent22List as default };
