import { defineComponent as n, computed as h, openBlock as g, createElementBlock as p, normalizeStyle as u, unref as c, renderSlot as d } from "vue";
const l = /* @__PURE__ */ n({
  name: "refConfig_bgImg",
  props: {
    config: {
      type: Object,
      required: !0
    },
    showImg: {
      type: Boolean,
      default: () => !0
    }
  },
  setup(i) {
    const r = i;
    let o = h(() => {
      let e = r.config, t = "";
      return e.useBGC ? {
        width: e.width + "px",
        height: e.height + "px",
        background: e.BGC
      } : e.imgSrc ? (t = e.imgSrc, {
        width: `${e.width ? e.width + "px" : "100%"}`,
        height: `${e.height ? e.height + "px" : "100%"}`,
        background: `url(${t})`,
        "background-size": r.showImg ? `${e.width ? e.width + "px" : "100%"} ${e.height ? e.height + "px" : "100%"}` : "0 0",
        "background-repeat": "no-repeat"
      }) : "";
    });
    return (e, t) => (g(), p("div", {
      style: u({ ...c(o) })
    }, [
      d(e.$slots, "default")
    ], 4));
  }
});
export {
  l as default
};
