import { defineComponent, useCssVars, unref, reactive, toRefs, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString } from "vue";
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: "bottom" };
const _hoisted_2 = ["onClick"];
const _hoisted_3 = ["src"];
const __default__ = defineComponent({ name: "EFooter01" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true
    },
    index: {
      type: Number,
      default: 1
    }
  },
  emits: ["tabChange"],
  setup(__props, { emit: emits }) {
    const props = __props;
    useCssVars((_ctx) => ({
      "05a8dc30": unref(titleTop) + "px",
      "40d1c8a1": unref(titleColor),
      "2039dd40": unref(titleSize) + "px"
    }));
    const state = reactive({
      list: [],
      act: 0
    });
    const change = (index) => {
      state.act = index;
      emits("tabChange", state.act);
    };
    const { datas, titleColor, titleSize, titleTop } = toRefs(
      props.chartConfig.option
    );
    state.list = datas;
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        (openBlock(true), createElementBlock(Fragment, null, renderList(state.list, (item, index) => {
          return openBlock(), createElementBlock("div", {
            key: index,
            onClick: ($event) => change(index)
          }, [
            createElementVNode("div", null, [
              createElementVNode("span", {
                class: normalizeClass({ active: index == state.act })
              }, toDisplayString(item.name), 3),
              createElementVNode("img", {
                src: index == state.act ? item.actImg : item.img
              }, null, 8, _hoisted_3)
            ])
          ], 8, _hoisted_2);
        }), 128))
      ]);
    };
  }
});
var _EFooter01 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-463781ab"]]);
export { _EFooter01 as default };
