"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
require("../../../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.js");
const index_esm_min = require("../../../../../../../../node_modules/.pnpm/vue-echarts@6.6.1_echarts@5.4.3_vue@3.3.4/node_modules/vue-echarts/dist/index.esm.min.js");
const barOptions = require("./barOptions.js");
const lineOptions = require("./lineOptions.js");
const runtimeCore_esmBundler = require("../../../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
const extension = require("../../../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/extension.js");
const install = require("../../../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/component/dataset/install.js");
const installCanvasRenderer = require("../../../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/renderer/installCanvasRenderer.js");
const install$1 = require("../../../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/chart/bar/install.js");
const install$2 = require("../../../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/chart/line/install.js");
const install$3 = require("../../../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/component/grid/install.js");
const install$4 = require("../../../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/component/tooltip/install.js");
const install$5 = require("../../../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/lib/component/legend/install.js");
const reactivity_esmBundler = require("../../../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
const _sfc_main = /* @__PURE__ */ runtimeCore_esmBundler.defineComponent({
  __name: "index",
  props: {
    color: {
      type: Array,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    extension.use([install.install, installCanvasRenderer.install, install$1.install, install$2.install, install$3.install, install$4.install, install$5.install]);
    const barOption = reactivity_esmBundler.ref();
    const lineOption = reactivity_esmBundler.ref();
    const chartStyle = {
      width: "528px",
      height: "200px"
    };
    runtimeCore_esmBundler.watch(
      () => props.color,
      (newData) => {
        barOption.value = barOptions.option(newData);
        lineOption.value = lineOptions.option(newData);
      },
      {
        immediate: true,
        deep: true
      }
    );
    return (_ctx, _cache) => {
      const _component_n_tab_pane = runtimeCore_esmBundler.resolveComponent("n-tab-pane");
      const _component_n_tabs = runtimeCore_esmBundler.resolveComponent("n-tabs");
      const _component_n_card = runtimeCore_esmBundler.resolveComponent("n-card");
      const _component_n_space = runtimeCore_esmBundler.resolveComponent("n-space");
      return runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_space, null, {
        default: runtimeCore_esmBundler.withCtx(() => [
          barOption.value ? (runtimeCore_esmBundler.openBlock(), runtimeCore_esmBundler.createBlock(_component_n_card, {
            key: 0,
            class: "go-mt-3",
            bordered: false,
            role: "dialog",
            size: "small",
            "aria-modal": "true"
          }, {
            default: runtimeCore_esmBundler.withCtx(() => [
              runtimeCore_esmBundler.createVNode(_component_n_tabs, {
                type: "segment",
                size: "small",
                animated: ""
              }, {
                default: runtimeCore_esmBundler.withCtx(() => [
                  runtimeCore_esmBundler.createVNode(_component_n_tab_pane, {
                    name: "柱状图",
                    tab: "柱状图"
                  }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index_esm_min.default), {
                        ref: "vChartRefBar",
                        theme: { color: __props.color },
                        option: barOption.value,
                        "manual-update": true,
                        autoresize: "",
                        style: chartStyle
                      }, null, 8, ["theme", "option"])
                    ]),
                    _: 1
                  }),
                  runtimeCore_esmBundler.createVNode(_component_n_tab_pane, {
                    name: "折线图",
                    tab: "折线图"
                  }, {
                    default: runtimeCore_esmBundler.withCtx(() => [
                      runtimeCore_esmBundler.createVNode(reactivity_esmBundler.unref(index_esm_min.default), {
                        ref: "vChartRefLine",
                        theme: { color: __props.color },
                        option: lineOption.value,
                        "manual-update": true,
                        autoresize: "",
                        style: chartStyle
                      }, null, 8, ["theme", "option"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              })
            ]),
            _: 1
          })) : runtimeCore_esmBundler.createCommentVNode("", true)
        ]),
        _: 1
      });
    };
  }
});
exports.default = _sfc_main;
