import { defineComponent as c, useCssVars as _, unref as t, toRefs as a, watch as x, computed as C, openBlock as S, createElementBlock as b, createElementVNode as r, toDisplayString as w } from "vue";
const v = { class: "go-text-box" }, $ = { class: "content" }, y = c({ name: "ETextBarrage" }), k = /* @__PURE__ */ c({
  ...y,
  props: {
    chartConfig: {
      type: Object,
      required: !0
    }
  },
  setup(i) {
    const o = i;
    _((n) => ({
      "0be66f88": t(f),
      "1f3e001e": t(p) + "px",
      "5589c71c": t(h) + "px",
      db0bf21a: t(l),
      d4f3fc02: t(e),
      "9955049e": t(m) + "s",
      "85eb8bfe": t(d) + "s"
    }));
    const { w: s } = a(o.chartConfig.attr), { fontColor: f, fontSize: p, letterSpacing: h, fontWeight: l, animationTime: d, animationSpeed: u, boxShadow: e, dataset: g } = a(
      o.chartConfig.option
    );
    x(
      o.chartConfig.option,
      () => {
        try {
          o.chartConfig.option.showShadow ? e.value = `${o.chartConfig.option.hShadow}px ${o.chartConfig.option.vShadow}px ${o.chartConfig.option.blurShadow}px ${o.chartConfig.option.colorShadow}` : e.value = "none";
        } catch (n) {
          console.log(n);
        }
      },
      {
        immediate: !0
      }
    );
    const m = C(() => Math.floor(s.value / u.value));
    return (n, B) => (S(), b("div", v, [
      r("div", $, [
        r("span", null, w(t(g)), 1)
      ])
    ]));
  }
});
export {
  k as default
};
