/**
 * An article editor. Articles are long-form pieces of content, composed of
 * multiple (Renderer) sections concatenated together.
 */
import * as React from "react";
import type { Issue } from "./components/issues-panel";
import type { APIOptions, Changeable, ImageUploader, PerseusDependenciesV2 } from "@khanacademy/perseus";
import type { PerseusArticle } from "@khanacademy/perseus-core";
type RendererProps = {
    content?: string;
    widgets?: any;
    images?: any;
};
type DefaultProps = {
    contentPaths?: ReadonlyArray<string>;
    json: PerseusArticle;
    mode: "diff" | "edit" | "json" | "preview";
    screen: "phone" | "tablet" | "desktop";
    sectionImageUploadGenerator: (i: number) => React.ReactElement<React.ComponentProps<"span">>;
};
type Props = DefaultProps & {
    apiOptions?: APIOptions;
    dependencies: PerseusDependenciesV2;
    imageUploader?: ImageUploader;
    previewURL: string;
    issues?: Issue[];
} & Changeable.ChangeableProps;
type State = {
    highlightLint: boolean;
    issues: Issue[];
};
export default class ArticleEditor extends React.Component<Props, State> {
    static defaultProps: DefaultProps;
    state: State;
    componentDidMount(): void;
    componentDidUpdate(prevProps: Props): void;
    /**
     * Updates the issues state with the linter issues for the current sections.
     * Helper function to be used with componentDidMount and componentDidUpdate.
     */
    _updateIssues(): void;
    _updatePreviewFrames(): void;
    _apiOptionsForSection(section: RendererProps, sectionIndex: number): any;
    _sections(): ReadonlyArray<RendererProps>;
    _renderEditor(): React.ReactElement<React.ComponentProps<"div">>;
    _renderAddSection(editingDisabled: boolean): React.ReactElement<React.ComponentProps<"div">>;
    _renderLinterHUD(): React.ReactElement<any>;
    _renderIframePreview(i: number | string, nochrome: boolean): React.ReactElement<any>;
    _renderPreviewMode(): React.ReactElement<React.ComponentProps<"div">>;
    _handleJsonChange: (newJson: PerseusArticle) => void;
    _handleEditorChange: (i: number, newProps: RendererProps) => void;
    _handleMoveSectionEarlier(i: number): void;
    _handleMoveSectionLater(i: number): void;
    _handleAddSectionAfter(i: number): void;
    _handleRemoveSection(i: number): void;
    serialize(): PerseusArticle;
    /**
     * Returns an array, with one element be section.
     * Each element is an array of lint warnings present in that section.
     *
     * This function can currently only be called in edit mode.
     */
    getSaveWarnings(): ReadonlyArray<RendererProps>;
    render(): React.ReactNode;
}
export {};
