import "../../../../../../node_modules/.pnpm/vue@3.3.4/node_modules/vue/dist/vue.runtime.esm-bundler.mjs";
import "../../../../../store/modules/designStore/designStore.mjs";
import "../../../../../settings/designSetting.mjs";
import "../../../../../../node_modules/.pnpm/screenfull@6.0.2/node_modules/screenfull/index.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.mjs";
import "../../../../../../node_modules/.pnpm/html2canvas@1.4.1/node_modules/html2canvas/dist/html2canvas.esm.mjs";
import "../../../../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.mjs";
import "../../../../../../node_modules/.pnpm/crypto-js@4.1.1/node_modules/crypto-js/index.mjs";
import "../../../../../enums/pageEnum.mjs";
import "../../../../../router/index.mjs";
import "../../../../../../node_modules/.pnpm/vue3-lazyload@0.2.5-beta_a6dezdz3je235ci4e3tu4rayna/node_modules/vue3-lazyload/dist/vue3-lazyload.esm.mjs";
import "../../../../../components/GoSkeleton/index.vue.mjs";
import "../../../../../components/GoLoading/index.mjs";
import { useChartDataFetch } from "../../../../../hooks/useChartDataFetch.hook.mjs";
import "../../../../../api/axios.mjs";
import "../../../../../../node_modules/.pnpm/echarts@5.4.3/node_modules/echarts/index.mjs";
import "../../../../../store/modules/langStore/langStore.mjs";
import { useChartEditStore } from "../../../../../store/modules/chartEditStore/chartEditStore.mjs";
import { option } from "./config.mjs";
import { defineComponent, watch, openBlock, createElementBlock, createElementVNode as createBaseVNode } from "../../../../../../node_modules/.pnpm/@vue_runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs";
import { useCssVars } from "../../../../../../node_modules/.pnpm/@vue_runtime-dom@3.3.4/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.mjs";
import { unref, toRefs, shallowReactive } from "../../../../../../node_modules/.pnpm/@vue_reactivity@3.3.4/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs";
import { toDisplayString } from "../../../../../../node_modules/.pnpm/@vue_shared@3.3.4/node_modules/@vue/shared/dist/shared.esm-bundler.mjs";
const _hoisted_1 = { class: "go-text-box" };
const _hoisted_2 = { class: "content" };
const _hoisted_3 = {
  key: 1,
  style: { "white-space": "pre-wrap" }
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "index",
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    useCssVars((_ctx) => ({
      "3de96504": unref(textAlign),
      "798f780c": unref(fontColor),
      "1ebb38b9": `${unref(paddingY)}px ${unref(paddingX)}px`,
      "5e8a36e3": unref(fontSize) + "px",
      "1ba7176a": unref(letterSpacing) + "px",
      "ede18276": unref(writingMode),
      "753a7e7e": unref(fontWeight),
      "d62f98e6": unref(borderWidth) + "px",
      "b6135d96": unref(borderRadius) + "px",
      "5f13ecbd": unref(borderColor),
      "1daa4c0a": unref(backgroundColor)
    }));
    const {
      linkHead,
      link,
      fontColor,
      fontSize,
      letterSpacing,
      paddingY,
      paddingX,
      textAlign,
      borderWidth,
      borderColor,
      borderRadius,
      writingMode,
      backgroundColor,
      fontWeight
    } = toRefs(props.chartConfig.option);
    const option$1 = shallowReactive({
      dataset: option.dataset
    });
    watch(
      () => props.chartConfig.option.dataset,
      (newData) => {
        option$1.dataset = newData;
      },
      {
        immediate: true,
        deep: false
      }
    );
    useChartDataFetch(props.chartConfig, useChartEditStore, (newData) => {
      option$1.dataset = newData;
    });
    const click = () => {
      window.open(linkHead.value + link.value);
    };
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createBaseVNode("div", _hoisted_2, [
          unref(link) ? (openBlock(), createElementBlock("span", {
            key: 0,
            style: { "cursor": "pointer", "white-space": "pre-wrap" },
            onClick: click
          }, toDisplayString(unref(option$1).dataset), 1)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(option$1).dataset), 1))
        ])
      ]);
    };
  }
});
export {
  _sfc_main as default
};
