import { jsx as r, Fragment as o } from "react/jsx-runtime";
import { ContentWrapper as s } from "../atoms/content-wrapper.js";
import { Image as f } from "../atoms/image.js";
function C({
  onLoad: e,
  width: h,
  height: t,
  className: g,
  publicId: p,
  externalId: m,
  Loader: a
}) {
  return /* @__PURE__ */ r(s, { ...m ? { externalId: m } : { publicId: p }, children: ({ content: i, loading: u }) => {
    if (u) return a ? /* @__PURE__ */ r(o, { children: a }) : null;
    const l = i?.image?.width && i?.image?.height ? i.image.width / i.image.height : void 0;
    return /* @__PURE__ */ r(
      f,
      {
        src: i?.image?.url,
        thumbhash: i?.image?.thumbhash,
        width: h,
        height: t,
        alt: i?.title,
        onLoad: e,
        className: g,
        aspectRatio: l
      }
    );
  } });
}
export {
  C as ImageContentWrapper
};
//# sourceMappingURL=image-content-wrapper.js.map
