import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { ImageContext } from "../../gravity-blocks/context/imageContext/index.js";
export const ImageBase = React.forwardRef(({ fetchPriority, alt, ...props }, ref) => {
    const { Image } = React.useContext(ImageContext);
    return Image ? (_jsx(Image, { fetchPriority: fetchPriority, alt: alt, ...props, ref: ref })) : (
    // There is an issue with fetchpriority attr in img in React.
    // It is still not supported. However it's nice to have ability to manage
    // this prop is good to have to improve Core Web Vitals.
    // So, here is a workaround to assign the attr.
    _jsx("img", { fetchPriority: fetchPriority, alt: alt, ...props, ref: ref }));
});
ImageBase.displayName = 'ImageBase';
export default ImageBase;
//# sourceMappingURL=ImageBase.js.map
