import { TOptions } from 'i18next';
import React from 'react';
import { RichTextAnswer as RichTextAnswerT } from '../../types/ExamAnswer';
import { CommonExamContext } from '../context/CommonExamContext';
import { Answer } from 'rich-text-editor';
export interface ScreenshotError {
    key: 'screenshot-too-big' | 'screenshot-byte-limit-reached' | 'screenshot-upload-failed';
    options?: TOptions;
}
type ErrorResponse = {
    response: {
        status: number;
    };
} & Error;
interface Props {
    answer?: RichTextAnswerT;
    className?: string;
    questionId: number;
    invalid: boolean;
    onChange: (answerHTML: string, answerText: string) => void;
    onError: (error: ScreenshotError) => void;
    saveScreenshot: (screenshot: Blob) => Promise<string>;
    labelledBy: string;
    lang?: string;
}
export default class RichTextAnswer extends React.PureComponent<Props> {
    static contextType: React.Context<CommonExamContext>;
    context: React.ContextType<typeof CommonExamContext>;
    private editorRef;
    private lastHTML;
    constructor(props: Props);
    handleSaveError: (err: ErrorResponse) => void;
    handleChange: (answer: Answer) => void;
    componentDidUpdate(): void;
    render(): React.ReactNode;
}
export {};
//# sourceMappingURL=RichTextAnswer.d.ts.map