import { defineComponent, useCssVars, unref, toRefs, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
import "./index.vue_vue_type_style_index_0_scoped_true_lang.mjs";
import _export_sfc from "../../../../_virtual/plugin-vue_export-helper.mjs";
const _hoisted_1 = { class: "go-text-box" };
const _hoisted_2 = { class: "content" };
const _hoisted_3 = { key: 1 };
const __default__ = defineComponent({ name: "ETextCommon" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    useCssVars((_ctx) => ({
      "8d3e9fac": unref(textAlign),
      "c8e4b2b4": unref(fontColor),
      "7f508d65": `${unref(paddingY)}px ${unref(paddingX)}px`,
      "df042ee2": unref(fontSize) + "px",
      "58db913e": unref(letterSpacing) + "px",
      "bcd2b31e": unref(writingMode),
      "108c98d6": unref(fontWeight),
      "ea4ddb3e": unref(borderWidth) + "px",
      "6d214ce1": unref(borderRadius) + "px",
      "779b5469": unref(borderColor),
      "231e8ba7": unref(backgroundColor)
    }));
    const {
      linkHead,
      link,
      fontColor,
      fontSize,
      letterSpacing,
      paddingY,
      paddingX,
      textAlign,
      borderWidth,
      borderColor,
      borderRadius,
      writingMode,
      backgroundColor,
      fontWeight,
      dataset
    } = toRefs(props.chartConfig.option);
    const click = () => {
      window.open(linkHead.value + link.value);
    };
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        createElementVNode("div", _hoisted_2, [
          unref(link) ? (openBlock(), createElementBlock("span", {
            key: 0,
            style: { "cursor": "pointer" },
            onClick: click
          }, toDisplayString(unref(dataset)), 1)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(dataset)), 1))
        ])
      ]);
    };
  }
});
var _ETextCommon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0045381c"]]);
export { _ETextCommon as default };
