import { defineComponent as r, computed as l, openBlock as h, createBlock as p, unref as i, normalizeStyle as c } from "vue";
import { NImage as f } from "naive-ui";
const d = /* @__PURE__ */ r({
  name: "refConfig_img",
  props: {
    config: {
      type: Object,
      required: !0
    },
    showImg: {
      type: Boolean,
      default: () => !0
    }
  },
  setup(t) {
    const o = t;
    let n = l(() => {
      let e = o.config;
      return e ? {
        position: "relative",
        left: e != null && e.positionLeft ? (e == null ? void 0 : e.positionLeft) + "px" : null,
        top: e != null && e.positionTop ? (e == null ? void 0 : e.positionTop) + "px" : null,
        width: e.width ? e.width + "px" : "auto",
        height: e.height ? e.height + "px" : "auto"
      } : {};
    });
    return (e, s) => (h(), p(i(f), {
      style: c({ ...i(n) }),
      "preview-disabled": "",
      src: t.config.imgSrc,
      width: t.config.width,
      height: t.config.height
    }, null, 8, ["style", "src", "width", "height"]));
  }
});
export {
  d as default
};
