import React, { ReactNode } from "react";
import { IRecommendedVersion, Room, MatrixEvent, EventTimeline, MatrixError } from "matrix-js-sdk/src/matrix";
import { CallState } from "matrix-js-sdk/src/webrtc/call";
import { ViewRoomOpts } from "@matrix-org/react-sdk-module-api/lib/lifecycles/RoomViewLifecycle";
import ResizeNotifier from "../../utils/ResizeNotifier";
import { Layout } from "../../settings/enums/Layout";
import { TimelineRenderingType } from "../../contexts/RoomContext";
import { E2EStatus } from "../../utils/ShieldUtils";
import { IMatrixClientCreds } from "../../MatrixClientPeg";
import { IOOBData, IThreepidInvite } from "../../stores/ThreepidInviteStore";
import { IOpts } from "../../createRoom";
import EditorStateTransfer from "../../utils/EditorStateTransfer";
import { SDKContext } from "../../contexts/SDKContext";
import { Call } from "../../models/Call";
import { SearchInfo } from "../../Searching";
interface IRoomProps {
    threepidInvite?: IThreepidInvite;
    oobData?: IOOBData;
    resizeNotifier: ResizeNotifier;
    justCreatedOpts?: IOpts;
    forceTimeline?: boolean;
    onRegistered?(credentials: IMatrixClientCreds): void;
}
export declare enum MainSplitContentType {
    Timeline = 0,
    MaximisedWidget = 1,
    Call = 2
}
export interface IRoomState {
    room?: Room;
    virtualRoom?: Room;
    roomId?: string;
    roomAlias?: string;
    roomLoading: boolean;
    peekLoading: boolean;
    shouldPeek: boolean;
    membersLoaded: boolean;
    initialEventId?: string;
    initialEventPixelOffset?: number;
    isInitialEventHighlighted?: boolean;
    initialEventScrollIntoView?: boolean;
    replyToEvent?: MatrixEvent;
    numUnreadMessages: number;
    /**
     * The state of an ongoing search if there is one.
     */
    search?: SearchInfo;
    callState?: CallState;
    activeCall: Call | null;
    canPeek: boolean;
    canSelfRedact: boolean;
    showApps: boolean;
    isPeeking: boolean;
    showRightPanel: boolean;
    /**
     * Whether the right panel shown is either of ThreadPanel or ThreadView.
     * Always false when `showRightPanel` is false.
     */
    threadRightPanel: boolean;
    roomLoadError?: MatrixError;
    joining: boolean;
    atEndOfLiveTimeline?: boolean;
    showTopUnreadMessagesBar: boolean;
    statusBarVisible: boolean;
    upgradeRecommendation?: IRecommendedVersion;
    canReact: boolean;
    canSendMessages: boolean;
    tombstone?: MatrixEvent;
    resizing: boolean;
    layout: Layout;
    lowBandwidth: boolean;
    alwaysShowTimestamps: boolean;
    showTwelveHourTimestamps: boolean;
    readMarkerInViewThresholdMs: number;
    readMarkerOutOfViewThresholdMs: number;
    showHiddenEvents: boolean;
    showReadReceipts: boolean;
    showRedactions: boolean;
    showJoinLeaves: boolean;
    showAvatarChanges: boolean;
    showDisplaynameChanges: boolean;
    matrixClientIsReady: boolean;
    showUrlPreview?: boolean;
    e2eStatus?: E2EStatus;
    rejecting?: boolean;
    hasPinnedWidgets?: boolean;
    mainSplitContentType?: MainSplitContentType;
    wasContextSwitch?: boolean;
    editState?: EditorStateTransfer;
    timelineRenderingType: TimelineRenderingType;
    liveTimeline?: EventTimeline;
    narrow: boolean;
    msc3946ProcessDynamicPredecessor: boolean;
    canAskToJoin: boolean;
    promptAskToJoin: boolean;
    viewRoomOpts: ViewRoomOpts;
}
export declare class RoomView extends React.Component<IRoomProps, IRoomState> {
    private static e2eStatusCache;
    private readonly askToJoinEnabled;
    private readonly dispatcherRef;
    private settingWatchers;
    private unmounted;
    private permalinkCreators;
    private roomView;
    private searchResultsPanel;
    private messagePanel;
    private roomViewBody;
    static contextType: React.Context<import("../../contexts/SDKContext").SdkContextClass>;
    context: React.ContextType<typeof SDKContext>;
    constructor(props: IRoomProps, context: React.ContextType<typeof SDKContext>);
    private onIsResizing;
    private onWidgetStoreUpdate;
    private onWidgetEchoStoreUpdate;
    private onWidgetLayoutChange;
    /**
     * Removes the Jitsi widget from the current user if
     * - Multiple Jitsi widgets have been added within {@link PREVENT_MULTIPLE_JITSI_WITHIN}
     * - The last (server timestamp) of these widgets is from the current user
     * This solves the issue if some people decide to start a conference and click the call button at the same time.
     */
    private doMaybeRemoveOwnJitsiWidget;
    private checkWidgets;
    private getMainSplitContentType;
    private onRoomViewStoreUpdate;
    private onConnectedCalls;
    private getRoomId;
    private getPermalinkCreatorForRoom;
    private stopAllPermalinkCreators;
    private setupRoom;
    private shouldShowApps;
    componentDidMount(): void;
    shouldComponentUpdate(nextProps: IRoomProps, nextState: IRoomState): boolean;
    componentDidUpdate(): void;
    componentWillUnmount(): void;
    private onRightPanelStoreUpdate;
    private onPageUnload;
    private onReactKeyDown;
    private onCallState;
    private onAction;
    private onLocalRoomEvent;
    private onRoomTimeline;
    private onEventDecrypted;
    private handleEffects;
    private onRoomName;
    private onKeyBackupStatus;
    canResetTimeline: () => boolean;
    private loadVirtualRoom;
    private onRoomLoaded;
    private onRoomTimelineReset;
    private getRoomTombstone;
    private calculateRecommendedVersion;
    private loadMembersIfJoined;
    private calculatePeekRules;
    private updatePreviewUrlVisibility;
    private onRoom;
    private onDeviceVerificationChanged;
    private onUserVerificationChanged;
    private onCrossSigningKeysChanged;
    private updateE2EStatus;
    private onUrlPreviewsEnabledChange;
    private onRoomStateEvents;
    private onRoomStateUpdate;
    private onMyMembership;
    private updatePermissions;
    private updateRoomMembers;
    private checkDesktopNotifications;
    private updateDMState;
    private onInviteClick;
    private onJoinButtonClicked;
    private onMessageListScroll;
    private resetJumpToEvent;
    private injectSticker;
    private onSearch;
    private onSearchScopeChange;
    private onSearchUpdate;
    private onAppsClick;
    private onForgetClick;
    private onRejectButtonClicked;
    private onRejectAndIgnoreClick;
    private onRejectThreepidInviteButtonClicked;
    private onSearchClick;
    private onSearchChange;
    private onCancelSearchClick;
    private jumpToLiveTimeline;
    private jumpToReadMarker;
    private forgetReadMarker;
    private updateTopUnreadMessagesBar;
    private getScrollState;
    private onStatusBarVisible;
    private onStatusBarHidden;
    /**
     * called by the parent component when PageUp/Down/etc is pressed.
     *
     * We pass it down to the scroll panel.
     */
    handleScrollKey: (ev: React.KeyboardEvent | KeyboardEvent) => void;
    /**
     * get any current call for this room
     */
    private getCallForRoom;
    private gatherTimelinePanelRef;
    private getOldRoom;
    getHiddenHighlightCount(): number;
    onHiddenHighlightsClick: () => void;
    private get messagePanelClassNames();
    private onFileDrop;
    private onMeasurement;
    private get viewsLocalRoom();
    private get permalinkCreator();
    private renderLocalRoomCreateLoader;
    private renderLocalRoomView;
    private renderWaitingForThirdPartyRoomView;
    /**
     * Handles the submission of a request to join a room.
     *
     * @param {string} reason - An optional reason for the request to join.
     * @returns {void}
     */
    private onSubmitAskToJoin;
    /**
     * Handles the cancellation of a request to join a room.
     *
     * @returns {void}
     */
    private onCancelAskToJoin;
    render(): ReactNode;
}
export default RoomView;
