import { MatrixClient, SSOFlow } from "matrix-js-sdk/src/matrix";
import React, { ReactNode } from "react";
import { IMatrixClientCreds } from "../../../MatrixClientPeg";
import { OidcNativeFlow } from "../../../Login";
import { ValidatedServerConfig } from "../../../utils/ValidatedServerConfig";
interface IProps {
    serverConfig: ValidatedServerConfig;
    defaultDeviceDisplayName?: string;
    email?: string;
    brand?: string;
    clientSecret?: string;
    sessionId?: string;
    idSid?: string;
    fragmentAfterLogin?: string;
    onLoggedIn(params: IMatrixClientCreds, password: string): Promise<void>;
    onLoginClick(): void;
    onServerConfigChange(config: ValidatedServerConfig): void;
}
interface IState {
    busy: boolean;
    errorText?: ReactNode;
    formVals: Record<string, string | undefined>;
    doingUIAuth: boolean;
    completedNoSignin: boolean;
    flows: {
        stages: string[];
    }[] | null;
    serverIsAlive: boolean;
    serverErrorIsFatal: boolean;
    serverDeadError?: ReactNode;
    matrixClient?: MatrixClient;
    registeredUsername?: string;
    differentLoggedInUserId?: string;
    ssoFlow?: SSOFlow;
    oidcNativeFlow?: OidcNativeFlow;
}
export default class Registration extends React.Component<IProps, IState> {
    private readonly loginLogic;
    private latestServerConfig?;
    private oidcNativeFlowEnabled;
    constructor(props: IProps);
    componentDidMount(): void;
    componentWillUnmount(): void;
    private unloadCallback;
    componentDidUpdate(prevProps: IProps): void;
    private replaceClient;
    private onFormSubmit;
    private requestEmailToken;
    private onUIAuthFinished;
    private setupPushers;
    private onLoginClick;
    private onGoToFormClicked;
    private makeRegisterRequest;
    private getUIAuthInputs;
    private onLoginClickWithCheck;
    private renderRegisterComponent;
    render(): React.ReactNode;
}
export {};
