import React, { ComponentProps, ReactNode } from "react";
import { ImageContent } from "matrix-js-sdk/src/types";
import { Tooltip } from "@vector-im/compound-web";
import { IBodyProps } from "./IBodyProps";
import RoomContext from "../../../contexts/RoomContext";
declare enum Placeholder {
    NoImage = 0,
    Blurhash = 1
}
interface IState {
    contentUrl: string | null;
    thumbUrl: string | null;
    isAnimated?: boolean;
    error?: unknown;
    imgError: boolean;
    imgLoaded: boolean;
    loadedImageDimensions?: {
        naturalWidth: number;
        naturalHeight: number;
    };
    hover: boolean;
    showImage: boolean;
    placeholder: Placeholder;
}
export default class MImageBody extends React.Component<IBodyProps, IState> {
    static contextType: React.Context<import("../../structures/RoomView").IRoomState & {
        threadId?: string;
    }>;
    context: React.ContextType<typeof RoomContext>;
    private unmounted;
    private image;
    private timeout?;
    private sizeWatcher?;
    state: IState;
    protected showImage(): void;
    protected onClick: (ev: React.MouseEvent) => void;
    protected onImageEnter: (e: React.MouseEvent<HTMLImageElement>) => void;
    protected onImageLeave: (e: React.MouseEvent<HTMLImageElement>) => void;
    private reconnectedListener;
    private onImageError;
    private onImageLoad;
    private getContentUrl;
    private get media();
    private getThumbUrl;
    private downloadImage;
    private clearBlurhashTimeout;
    componentDidMount(): void;
    componentWillUnmount(): void;
    protected getBanner(content: ImageContent): ReactNode;
    protected messageContent(contentUrl: string | null, thumbUrl: string | null, content: ImageContent, forcedHeight?: number): ReactNode;
    protected wrapImage(contentUrl: string | null | undefined, children: JSX.Element): ReactNode;
    protected getPlaceholder(width: number, height: number): ReactNode;
    protected getTooltipProps(): ComponentProps<typeof Tooltip> | null;
    protected getFileBody(): ReactNode;
    render(): React.ReactNode;
}
interface PlaceholderIProps {
    hover?: boolean;
    maxWidth?: number;
}
export declare class HiddenImagePlaceholder extends React.PureComponent<PlaceholderIProps> {
    render(): React.ReactNode;
}
export {};
