import * as React from "react";
import type Editor from "../editor";
import type { APIOptions } from "@khanacademy/perseus";
import type { PerseusWidget } from "@khanacademy/perseus-core";
type WidgetEditorProps = {
    id: string;
    onChange: (widgetInfo: PerseusWidget, cb?: () => unknown, silent?: boolean) => unknown;
    onRemove: () => unknown;
    apiOptions: APIOptions;
    widgetIsOpen?: boolean;
} & Omit<PerseusWidget, "key">;
type WidgetEditorState = {
    showWidget: boolean;
    widgetInfo: PerseusWidget;
};
declare class WidgetEditor extends React.Component<WidgetEditorProps, WidgetEditorState> {
    widget: React.RefObject<Editor>;
    constructor(props: WidgetEditorProps);
    UNSAFE_componentWillReceiveProps(nextProps: WidgetEditorProps): void;
    _toggleWidget: (e: React.SyntheticEvent) => void;
    _handleWidgetChange: (newProps: WidgetEditorProps, cb: () => unknown, silent: boolean) => void;
    _setStatic: (value: boolean) => void;
    _handleAlignmentChange: (e: React.SyntheticEvent<HTMLSelectElement>) => void;
    getSaveWarnings: () => any;
    serialize: () => {
        type: "categorizer" | "iframe" | "table" | "video" | "image" | "radio" | "cs-program" | "definition" | "dropdown" | "explanation" | "expression" | "free-response" | "grapher" | "graded-group-set" | "graded-group" | "group" | "input-number" | "interaction" | "interactive-graph" | "label-image" | "matcher" | "matrix" | "measurer" | "molecule-renderer" | "number-line" | "numeric-input" | "orderer" | "phet-simulation" | "python-program" | "plotter" | "sorter" | "mock-widget" | "deprecated-standin";
        alignment: string | undefined;
        static: boolean | undefined;
        graded: boolean | undefined;
        options: import("@khanacademy/perseus-core").PerseusRenderer;
        version: import("@khanacademy/perseus-core").Version | undefined;
    };
    render(): React.ReactNode;
}
export default WidgetEditor;
