import React, { ReactNode } from "react";
import { EventType, MatrixEvent, NotificationCountType, Relations, RelationType, RoomMember, Thread } from "matrix-js-sdk/src/matrix";
import { EventShieldColour, EventShieldReason } from "matrix-js-sdk/src/crypto-api";
import { Layout } from "../../../settings/enums/Layout";
import EditorStateTransfer from "../../../utils/EditorStateTransfer";
import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks";
import LegacyCallEventGrouper from "../../structures/LegacyCallEventGrouper";
import { IReadReceiptInfo } from "./ReadReceiptMarker";
import RoomContext from "../../../contexts/RoomContext";
import { MediaEventHelper } from "../../../utils/MediaEventHelper";
export type GetRelationsForEvent = (eventId: string, relationType: RelationType | string, eventType: EventType | string) => Relations | null | undefined;
export interface IReadReceiptProps {
    userId: string;
    roomMember: RoomMember | null;
    ts: number;
}
export interface IEventTileOps {
    isWidgetHidden(): boolean;
    unhideWidget(): void;
}
export interface IEventTileType extends React.Component {
    getEventTileOps?(): IEventTileOps;
    getMediaHelper(): MediaEventHelper | undefined;
}
export interface EventTileProps {
    mxEvent: MatrixEvent;
    isRedacted?: boolean;
    continuation?: boolean;
    last?: boolean;
    lastInSection?: boolean;
    lastSuccessful?: boolean;
    contextual?: boolean;
    highlights?: string[];
    highlightLink?: string;
    showUrlPreview?: boolean;
    isSelectedEvent?: boolean;
    onHeightChanged?: () => void;
    readReceipts?: IReadReceiptProps[];
    readReceiptMap?: {
        [userId: string]: IReadReceiptInfo;
    };
    checkUnmounting?: () => boolean;
    eventSendStatus?: string;
    forExport?: boolean;
    isTwelveHour?: boolean;
    getRelationsForEvent?: GetRelationsForEvent;
    showReactions?: boolean;
    layout?: Layout;
    showReadReceipts?: boolean;
    editState?: EditorStateTransfer;
    replacingEventId?: string;
    permalinkCreator?: RoomPermalinkCreator;
    callEventGrouper?: LegacyCallEventGrouper;
    as?: string;
    alwaysShowTimestamps?: boolean;
    hideSender?: boolean;
    showThreadInfo?: boolean;
    isSeeingThroughMessageHiddenForModeration?: boolean;
    hideTimestamp?: boolean;
    inhibitInteraction?: boolean;
}
interface IState {
    actionBarFocused: boolean;
    /**
     * E2EE shield we should show for decryption problems.
     *
     * Note this will be `EventShieldColour.NONE` for all unencrypted events, **including those in encrypted rooms**.
     */
    shieldColour: EventShieldColour;
    /**
     * Reason code for the E2EE shield. `null` if `shieldColour` is `EventShieldColour.NONE`
     */
    shieldReason: EventShieldReason | null;
    reactions?: Relations | null | undefined;
    hover: boolean;
    contextMenu?: {
        position: Pick<DOMRect, "top" | "left" | "bottom">;
        link?: string;
    };
    isQuoteExpanded?: boolean;
    thread: Thread | null;
    threadNotification?: NotificationCountType;
}
/**
 * When true, the tile qualifies for some sort of special read receipt.
 * This could be a 'sending' or 'sent' receipt, for example.
 * @returns {boolean}
 */
export declare function isEligibleForSpecialReceipt(event: MatrixEvent): boolean;
export declare class UnwrappedEventTile extends React.Component<EventTileProps, IState> {
    private suppressReadReceiptAnimation;
    private isListeningForReceipts;
    private tile;
    private replyChain;
    readonly ref: React.RefObject<HTMLElement>;
    static defaultProps: {
        onHeightChanged: () => void;
        forExport: boolean;
        layout: Layout;
    };
    static contextType: React.Context<import("../../structures/RoomView").IRoomState & {
        threadId?: string;
    }>;
    context: React.ContextType<typeof RoomContext>;
    private unmounted;
    constructor(props: EventTileProps, context: React.ContextType<typeof RoomContext>);
    /**
     * When true, the tile qualifies for some sort of special read receipt. This could be a 'sending'
     * or 'sent' receipt, for example.
     * @returns {boolean}
     */
    private get isEligibleForSpecialReceipt();
    private get shouldShowSentReceipt();
    private get shouldShowSendingReceipt();
    componentDidMount(): void;
    private updateThread;
    shouldComponentUpdate(nextProps: EventTileProps, nextState: IState): boolean;
    componentWillUnmount(): void;
    componentDidUpdate(prevProps: Readonly<EventTileProps>, prevState: Readonly<IState>): void;
    private onNewThread;
    private get thread();
    private renderThreadPanelSummary;
    private renderThreadInfo;
    private viewInRoom;
    private copyLinkToThread;
    private onRoomReceipt;
    /** called when the event is decrypted after we show it.
     */
    private onDecrypted;
    private onDeviceVerificationChanged;
    private onUserVerificationChanged;
    /** called when the event is edited after we show it. */
    private onReplaced;
    private verifyEvent;
    private doVerifyEvent;
    private propsEqual;
    /**
     * Determine whether an event should be highlighted
     * For edited events, if a previous version of the event was highlighted
     * the event should remain highlighted as the user may have been notified
     * (Clearer explanation of why an event is highlighted is planned -
     * https://github.com/vector-im/element-web/issues/24927)
     * @returns boolean
     */
    private shouldHighlight;
    private onSenderProfileClick;
    private onPermalinkClicked;
    private renderE2EPadlock;
    private onActionBarFocusChange;
    private getTile;
    private getReplyChain;
    private getReactions;
    private onReactionsCreated;
    private onContextMenu;
    private onTimestampContextMenu;
    private showContextMenu;
    private onCloseMenu;
    private setQuoteExpanded;
    /**
     * In some cases we can't use shouldHideEvent() since whether or not we hide
     * an event depends on other things that the event itself
     * @returns {boolean} true if event should be hidden
     */
    private shouldHideEvent;
    private renderContextMenu;
    render(): ReactNode;
}
declare const SafeEventTile: (props: EventTileProps & React.RefAttributes<UnwrappedEventTile>) => React.ReactElement | null;
export default SafeEventTile;
