import { defineComponent as m, useCssVars as S, unref as t, ref as n, toRefs as w, openBlock as l, createElementBlock as s, createVNode as i, createElementVNode as r, normalizeStyle as B, Fragment as h, renderList as _, normalizeClass as f, isRef as V, toDisplayString as u, withCtx as I, createTextVNode as R, createCommentVNode as E } from "vue";
import F from "./images/open.mjs";
import z from "./images/close.mjs";
import { NImage as A, NInput as G, NSwitch as U } from "naive-ui";
const j = { class: "sidebar_2" }, q = ["onClick"], D = { class: "sidebar_1" }, H = { key: 0 }, L = m({ name: "ESidebar01" }), K = /* @__PURE__ */ m({
  ...L,
  props: {
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(k) {
    const b = k;
    S((p) => ({
      "1663ab44": t(y) + "px"
    }));
    let o = n(0), g = n(-1);
    const { dataset: d, height: y } = w(b.chartConfig.option), C = n((p, N) => {
      const e = {};
      return e.background = "RGBA(17, 49, 90, 1)", e.boxShadow = "0 0 0 2px RGBA(9, 69, 130, 1)", e;
    }), c = n(855), x = () => {
      c.value = c.value == 0 ? 855 : 0;
    };
    return (p, N) => (l(), s("div", null, [
      i(t(A), {
        width: "55",
        src: c.value == 0 ? t(F) : t(z),
        class: "openorclose",
        "preview-disabled": "",
        onClick: x
      }, null, 8, ["src"]),
      r("div", {
        class: "sidebar",
        style: B({ height: c.value + "px" })
      }, [
        r("div", j, [
          (l(!0), s(h, null, _(t(d), (e, a) => (l(), s("div", {
            class: f({ active: t(o) == a }),
            onClick: (v) => V(o) ? o.value = a : o = a
          }, u(e.key), 11, q))), 256))
        ]),
        r("div", D, [
          r("div", null, [
            i(t(G), {
              placeholder: "\u8BF7\u8F93\u5165",
              class: "input"
            }, {
              suffix: I(() => []),
              _: 1
            })
          ]),
          (l(!0), s(h, null, _(t(d)[t(o)].children, (e, a) => (l(), s("div", {
            key: a,
            class: f(["sidebar_1_1", { active: t(g) == a }])
          }, [
            r("div", null, [
              R(u(e.key) + " ", 1),
              e.value ? (l(), s("span", H, "(" + u(e.value) + ")", 1)) : E("", !0)
            ]),
            i(t(U), {
              value: e.checked,
              "onUpdate:value": (v) => e.checked = v,
              "rail-style": C.value
            }, null, 8, ["value", "onUpdate:value", "rail-style"])
          ], 2))), 128))
        ])
      ], 4)
    ]));
  }
});
export {
  K as default
};
