import { defineComponent, computed, openBlock, createBlock, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, renderSlot } from "vue";
import { NGradientText } from "naive-ui";
import "./refConfig_text.vue_vue_type_style_index_0_scoped_true_lang.mjs";
import _export_sfc from "../../../../_virtual/plugin-vue_export-helper.mjs";
const _hoisted_1 = { key: 0 };
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "refConfig_text",
  props: {
    config: {
      type: Object,
      required: true
    },
    showImg: {
      type: Boolean,
      default: () => true
    }
  },
  setup(__props) {
    const props = __props;
    let style = computed(() => {
      let a = props.config;
      let showshade = a == null ? void 0 : a.showshade;
      return {
        color: showshade ? null : a == null ? void 0 : a.color,
        fontSize: (a == null ? void 0 : a.fontSize) + "px",
        fontWeight: a == null ? void 0 : a.fontWeight,
        position: "relative",
        left: (a == null ? void 0 : a.positionLeft) ? (a == null ? void 0 : a.positionLeft) + "px" : null,
        top: (a == null ? void 0 : a.positionTop) ? (a == null ? void 0 : a.positionTop) + "px" : null,
        fontFamily: (a == null ? void 0 : a.fontFamily) ? a == null ? void 0 : a.fontFamily : null
      };
    });
    return (_ctx, _cache) => {
      var _a;
      return openBlock(), createBlock(unref(NGradientText), {
        gradient: ((_a = __props.config) == null ? void 0 : _a.gradient) || {},
        style: normalizeStyle({ ...unref(style) })
      }, {
        default: withCtx(() => {
          var _a2;
          return [
            !_ctx.$slots["text"] ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString((_a2 = __props.config) == null ? void 0 : _a2.text), 1)) : createCommentVNode("", true),
            renderSlot(_ctx.$slots, "text", {}, void 0, true)
          ];
        }),
        _: 3
      }, 8, ["gradient", "style"]);
    };
  }
});
var refConfig_text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-25b2061b"]]);
export { refConfig_text as default };
