import { JSX } from 'react';
type ImagePreloaderStatus = 'PENDING' | 'FAILED' | 'LOADED';
export type ImagePreloaderChild = (props: {
    status: ImagePreloaderStatus;
    image: HTMLImageElement;
}) => JSX.Element | null;
export type ImagePreloaderProps = {
    /**
     * The URL of the image to load.
     */
    src: string;
    /**
     * Invoked when the image is loaded.
     *
     * @param image The native Image object.
     */
    onLoaded?: (image: HTMLImageElement) => void;
    /**
     * Invoked when the image failed to load.
     *
     * @param image The native Image object.
     */
    onFailed?: (image: HTMLImageElement) => void;
    /**
     * Whether to set the "crossOrigin" to "anonymous".
     *
     * @default false
     */
    isAnonymous?: boolean;
    /**
     * A render function can be used to access both the current state and the image element.
     *
     * Using this, you can decide how to render the different states and/or the loaded image.
     *
     * The function will receive props containing the `status` and `image` properties.
     *
     * `status` will be one of `PENDING`, `FAILED` or `LOADED`. `image` is the Image element.
     */
    children?: ImagePreloaderChild;
};
declare const ImagePreloader: {
    (props: ImagePreloaderProps): JSX.Element | null;
    STATUS_PENDING: string;
    STATUS_LOADED: string;
    STATUS_FAILED: string;
};
export default ImagePreloader;
