import { defineComponent as d, ref as C, toRefs as k, openBlock as t, createElementBlock as n, createVNode as c, unref as r, withCtx as s, Fragment as i, renderList as u, normalizeClass as v, isRef as h, createElementVNode as y, toDisplayString as g } from "vue";
import { NCollapse as N, NCollapseItem as x } from "naive-ui";
const E = { class: "louc" }, w = d({ name: "ESwitchComponent02" }), b = /* @__PURE__ */ d({
  ...w,
  props: {
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(p) {
    const f = p;
    let o = C(-1);
    const { dataset: m } = k(f.chartConfig.option);
    return (B, R) => (t(), n("div", E, [
      c(r(N), { accordion: "" }, {
        default: s(() => [
          (t(!0), n(i, null, u(r(m), (l, e) => (t(), n("div", {
            key: e,
            class: v(["taer", { active: r(o) == e }])
          }, [
            c(r(x), {
              title: l.key,
              name: e,
              onClick: (a) => h(o) ? o.value = e : o = e
            }, {
              default: s(() => [
                (t(!0), n(i, null, u(l.children, (a, _) => (t(), n("div", {
                  key: _,
                  class: "ttce"
                }, [
                  y("div", null, g(a.key), 1)
                ]))), 128))
              ]),
              _: 2
            }, 1032, ["title", "name", "onClick"])
          ], 2))), 128))
        ]),
        _: 1
      })
    ]));
  }
});
export {
  b as default
};
