import { defineComponent as n, useCssVars as l, openBlock as d, createElementBlock as p, createElementVNode as s, normalizeStyle as u, unref as c, toDisplayString as f } from "vue";
import { autoInstallFont as x, jsonToCssStyle as m } from "../../utils/json2css.mjs";
const y = { class: "text-carousel" }, S = ["text", "ztitle"], g = n({ name: "zv-text-carousel" }), _ = /* @__PURE__ */ n({
  ...g,
  props: {
    basicOption: {},
    sources: {}
  },
  setup(h) {
    l((e) => ({
      e20711d2: e.basicOption.animation + "s",
      "961fadac": e.basicOption.gap + "px"
    }));
    const r = () => ({ rendererDomStyle: (t) => {
      x(t.fontFamily);
      const o = {};
      t.color && t.color.includes("linear-gradient") && (o.backgroundImage = t.color, o["-webkit-background-clip"] = "text", o.color = "transparent");
      const i = {};
      return t.textAlign === "left" && (t.justifyContent = "flex-start"), t.textAlign === "center" && (t.justifyContent = "center"), t.textAlign === "right" && (t.justifyContent = "flex-end"), {
        ...m(t),
        ...o,
        ...i,
        ...t.textShadow.show ? { "--text-shadow": `${t.textShadow.x}px ${t.textShadow.y}px ${t.textShadow.value}px ${t.textShadow.color}` } : {}
      };
    } }), { rendererDomStyle: a } = r();
    return (e, t) => (d(), p("div", y, [
      s("p", {
        class: "words",
        text: e.basicOption.value,
        style: u(c(a)(e.basicOption.css)),
        ztitle: e.basicOption.value
      }, f(e.basicOption.value), 13, S)
    ]));
  }
});
export {
  _ as default
};
