import { defineComponent as i, toRefs as C, computed as h, openBlock as n, createElementBlock as c, Fragment as v, renderList as y, unref as e, normalizeClass as b, createElementVNode as k, normalizeStyle as w, createVNode as r, withCtx as a, createTextVNode as x, toDisplayString as I } from "vue";
import s from "../../../NComponents/configCommon/refConfig.vue_vue_type_script_setup_true_lang.mjs";
const B = { class: "btns" }, E = ["onClick"], N = i({ name: "ESwitchComponent03" }), q = /* @__PURE__ */ i({
  ...N,
  props: {
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(l) {
    const m = l, { dataset: p, active: o, bgImageConfig: f, titleConfig: g, spaceBetween: u } = C(m.chartConfig.option);
    let _ = h(() => ({
      margin: `0 ${u.value}px`
    }));
    return (S, V) => (n(), c("div", B, [
      (n(!0), c(v, null, y(e(p), (d, t) => (n(), c("div", {
        class: b({ active: e(o) == t }),
        key: t
      }, [
        k("div", {
          onClick: ($) => o.value = t,
          style: w({ ...e(_) })
        }, [
          r(s, {
            config: e(f),
            type: "bgImg",
            class: "allcenter",
            showImg: e(o) == t
          }, {
            default: a(() => [
              r(s, {
                config: e(g),
                type: "text"
              }, {
                text: a(() => [
                  x(I(d.label), 1)
                ]),
                _: 2
              }, 1032, ["config"])
            ]),
            _: 2
          }, 1032, ["config", "showImg"])
        ], 12, E)
      ], 2))), 128))
    ]));
  }
});
export {
  q as default
};
