import React from "react";
import { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
import { Member } from "../../../utils/direct-messages";
import { InviteKind } from "./InviteDialogTypes";
interface Result {
    userId: string;
    user: Member;
    lastActive?: number;
}
declare enum TabId {
    UserDirectory = "users",
    DialPad = "dialpad"
}
interface BaseProps {
    onFinished: (success?: boolean) => void;
    initialText?: string;
}
interface InviteDMProps extends BaseProps {
    kind?: InviteKind.Dm;
}
interface InviteRoomProps extends BaseProps {
    kind: InviteKind.Invite;
    roomId: string;
}
interface InviteCallProps extends BaseProps {
    kind: InviteKind.CallTransfer;
    call: MatrixCall;
}
type Props = InviteDMProps | InviteRoomProps | InviteCallProps;
interface IInviteDialogState {
    targets: Member[];
    filterText: string;
    recents: Result[];
    numRecentsShown: number;
    suggestions: Result[];
    numSuggestionsShown: number;
    serverResultsMixin: Result[];
    threepidResultsMixin: Result[];
    canUseIdentityServer: boolean;
    tryingIdentityServer: boolean;
    consultFirst: boolean;
    dialPadValue: string;
    currentTabId: TabId;
    busy: boolean;
    errorText?: string;
}
export default class InviteDialog extends React.PureComponent<Props, IInviteDialogState> {
    static defaultProps: Partial<Props>;
    private debounceTimer;
    private editorRef;
    private numberEntryFieldRef;
    private unmounted;
    private encryptionByDefault;
    private profilesStore;
    constructor(props: Props);
    componentDidMount(): void;
    componentWillUnmount(): void;
    private onConsultFirstChange;
    private excludeExternals;
    static buildRecents(excludedTargetIds: Set<string>): Result[];
    private buildSuggestions;
    private shouldAbortAfterInviteError;
    private convertFilter;
    /**
     * Check if there are unknown profiles if promptBeforeInviteUnknownUsers setting is enabled.
     * If so show the "invite anyway?" dialog. Otherwise directly create the DM local room.
     */
    private checkProfileAndStartDm;
    private startDm;
    private setBusy;
    private showAskInviteAnywayDialog;
    private inviteUsers;
    private transferCall;
    private onKeyDown;
    private onCancel;
    private updateSuggestions;
    private updateFilter;
    private showMoreRecents;
    private showMoreSuggestions;
    private toggleMember;
    private removeMember;
    private parseFilter;
    private onPaste;
    private onClickInputArea;
    private onUseDefaultIdentityServerClick;
    private onManageSettingsClick;
    private renderSection;
    private renderEditor;
    private renderIdentityServerWarning;
    private onDialFormSubmit;
    private onDialChange;
    private onDigitPress;
    private onDeletePress;
    private onTabChange;
    private onLinkClick;
    private get screenName();
    /**
     * If encryption by default is enabled, third-party invites should be encrypted as well.
     * For encryption to work, the other side requires a device.
     * To achieve this Element implements a waiting room until all have joined.
     * Waiting for many users degrades the UX → only one email invite is allowed at a time.
     *
     * @param targets - Optional member list to check. Uses targets from state if not provided.
     */
    private canInviteMore;
    /**
     * A third-party invite is possible if
     * - this is a non-DM dialog or
     * - there are no invites yet or
     * - encryption by default is not enabled
     *
     * Also see {@link InviteDialog#canInviteMore}.
     *
     * @param targets - Optional member list to check. Uses targets from state if not provided.
     */
    private canInviteThirdParty;
    private hasFilterAtLeastOneEmail;
    render(): React.ReactNode;
}
export {};
