import React from "react";
import { SecretStorage } from "matrix-js-sdk/src/matrix";
import { IKeyBackupRestoreResult } from "matrix-js-sdk/src/crypto/keybackup";
import { KeyBackupInfo } from "matrix-js-sdk/src/crypto-api";
declare enum RestoreType {
    Passphrase = "passphrase",
    RecoveryKey = "recovery_key",
    SecretStorage = "secret_storage"
}
declare enum ProgressState {
    PreFetch = "prefetch",
    Fetch = "fetch",
    LoadKeys = "load_keys"
}
interface IProps {
    showSummary?: boolean;
    keyCallback?: (key: Uint8Array) => void;
    onFinished(done?: boolean): void;
}
interface IState {
    backupInfo: KeyBackupInfo | null;
    backupKeyStored: Record<string, SecretStorage.SecretStorageKeyDescription> | null;
    loading: boolean;
    loadError: boolean | null;
    restoreError: unknown | null;
    recoveryKey: string;
    recoverInfo: IKeyBackupRestoreResult | null;
    recoveryKeyValid: boolean;
    forceRecoveryKey: boolean;
    passPhrase: string;
    restoreType: RestoreType | null;
    progress: {
        stage: ProgressState | string;
        total?: number;
        successes?: number;
        failures?: number;
    };
}
export default class RestoreKeyBackupDialog extends React.PureComponent<IProps, IState> {
    static defaultProps: Partial<IProps>;
    constructor(props: IProps);
    componentDidMount(): void;
    private onCancel;
    private onDone;
    private onUseRecoveryKeyClick;
    private progressCallback;
    private onResetRecoveryClick;
    private onRecoveryKeyChange;
    private onPassPhraseNext;
    private onRecoveryKeyNext;
    private onPassPhraseChange;
    private restoreWithSecretStorage;
    private restoreWithCachedKey;
    private loadBackupStatus;
    render(): React.ReactNode;
}
export {};
