import { defineComponent, ref, toRefs, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, normalizeClass, isRef, createElementVNode, toDisplayString } from "vue";
import { NCollapse, NCollapseItem } from "naive-ui";
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: "louc" };
const __default__ = defineComponent({ name: "ESwitchComponent02" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    let active = ref(-1);
    const { dataset } = toRefs(props.chartConfig.option);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createVNode(unref(NCollapse), { accordion: "" }, {
          default: withCtx(() => [
            (openBlock(true), createElementBlock(Fragment, null, renderList(unref(dataset), (itme, i) => {
              return openBlock(), createElementBlock("div", {
                key: i,
                class: normalizeClass(["taer", { active: unref(active) == i }])
              }, [
                createVNode(unref(NCollapseItem), {
                  title: itme.key,
                  name: i,
                  onClick: ($event) => isRef(active) ? active.value = i : active = i
                }, {
                  default: withCtx(() => [
                    (openBlock(true), createElementBlock(Fragment, null, renderList(itme.children, (itee, index) => {
                      return openBlock(), createElementBlock("div", {
                        key: index,
                        class: "ttce"
                      }, [
                        createElementVNode("div", null, toDisplayString(itee.key), 1)
                      ]);
                    }), 128))
                  ]),
                  _: 2
                }, 1032, ["title", "name", "onClick"])
              ], 2);
            }), 128))
          ]),
          _: 1
        })
      ]);
    };
  }
});
var _ESwitchComponent02 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1e59fa2c"]]);
export { _ESwitchComponent02 as default };
