import { defineComponent as p, computed as c, openBlock as i, createBlock as u, unref as l, normalizeStyle as d, withCtx as m, createElementBlock as g, toDisplayString as h, createCommentVNode as y, renderSlot as x } from "vue";
import { NGradientText as a } from "naive-ui";
const w = { key: 0 }, B = /* @__PURE__ */ p({
  name: "refConfig_text",
  props: {
    config: {
      type: Object,
      required: !0
    },
    showImg: {
      type: Boolean,
      default: () => !0
    }
  },
  setup(e) {
    const r = e;
    let s = c(() => {
      let t = r.config;
      return {
        color: (t == null ? void 0 : t.showshade) ? null : t == null ? void 0 : t.color,
        fontSize: (t == null ? void 0 : t.fontSize) + "px",
        fontWeight: t == null ? void 0 : t.fontWeight,
        position: "relative",
        left: t != null && t.positionLeft ? (t == null ? void 0 : t.positionLeft) + "px" : null,
        top: t != null && t.positionTop ? (t == null ? void 0 : t.positionTop) + "px" : null,
        fontFamily: t != null && t.fontFamily ? t == null ? void 0 : t.fontFamily : null
      };
    });
    return (t, f) => {
      var o;
      return i(), u(l(a), {
        gradient: ((o = e.config) == null ? void 0 : o.gradient) || {},
        style: d({ ...l(s) })
      }, {
        default: m(() => {
          var n;
          return [
            t.$slots.text ? y("", !0) : (i(), g("span", w, h((n = e.config) == null ? void 0 : n.text), 1)),
            x(t.$slots, "text", {}, void 0, !0)
          ];
        }),
        _: 3
      }, 8, ["gradient", "style"]);
    };
  }
});
export {
  B as default
};
