import * as React from "react";
import { PerseusI18nContext } from "../../components/i18n-context";
import type { DependenciesContext } from "../../dependencies";
import type { Widget, WidgetProps } from "../../types";
import type { ExpressionPromptJSON } from "../../widget-ai-utils/expression/expression-ai-utils";
import type { KeypadConfiguration, KeypadKey, PerseusExpressionRubric, PerseusExpressionUserInput, PerseusExpressionWidgetOptions } from "@khanacademy/perseus-core";
type InputPath = ReadonlyArray<string>;
type ExternalProps = WidgetProps<PerseusExpressionWidgetOptions, PerseusExpressionUserInput>;
type Props = ExternalProps & Partial<React.ContextType<typeof DependenciesContext>> & {
    apiOptions: NonNullable<ExternalProps["apiOptions"]>;
    buttonSets: NonNullable<ExternalProps["buttonSets"]>;
    functions: NonNullable<ExternalProps["functions"]>;
    linterContext: NonNullable<ExternalProps["linterContext"]>;
    onBlur: NonNullable<ExternalProps["onBlur"]>;
    onFocus: NonNullable<ExternalProps["onFocus"]>;
    times: NonNullable<ExternalProps["times"]>;
    visibleLabel: PerseusExpressionWidgetOptions["visibleLabel"];
    ariaLabel: PerseusExpressionWidgetOptions["ariaLabel"];
};
type DefaultProps = {
    apiOptions: Props["apiOptions"];
    buttonSets: Props["buttonSets"];
    functions: Props["functions"];
    linterContext: Props["linterContext"];
    onBlur: Props["onBlur"];
    onFocus: Props["onFocus"];
    times: Props["times"];
    userInput: Props["userInput"];
};
export declare class Expression extends React.Component<Props> implements Widget {
    static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
    context: React.ContextType<typeof PerseusI18nContext>;
    _textareaId: string;
    _isMounted: boolean;
    static defaultProps: DefaultProps;
    displayName: string;
    componentDidMount: () => void;
    componentWillUnmount: () => void;
    getUserInput(): PerseusExpressionUserInput;
    getPromptJSON(): ExpressionPromptJSON;
    changeAndTrack: (userInput: string, cb: () => void) => void;
    _handleFocus: () => void;
    _handleBlur: () => void;
    focus: () => boolean;
    focusInputPath(inputPath: InputPath): void;
    blurInputPath(inputPath: InputPath): void;
    insert(keyPressed: KeypadKey): void;
    getInputPaths: () => ReadonlyArray<ReadonlyArray<any>>;
    getKeypadConfiguration(): KeypadConfiguration;
    /**
     * @deprecated and likely very broken API
     * [LEMS-3185] do not trust serializedState
     */
    getSerializedState(): {
        value: string;
        keypadConfiguration: KeypadConfiguration;
        buttonSets: import("@khanacademy/perseus-core").LegacyButtonSets;
        functions: string[];
        times: boolean;
        extraKeys?: KeypadKey[];
        visibleLabel: string;
        ariaLabel: string;
        buttonsVisible?: "always" | "never" | "focused";
        trackInteraction: (extraData?: Empty | undefined) => void;
        widgetId: string;
        widgetIndex: number;
        alignment: string | null | undefined;
        static: boolean | null | undefined;
        problemNum: number | null | undefined;
        apiOptions: Readonly<Readonly<{
            isArticle?: boolean;
            onFocusChange?: (newFocusPath: import("../..").FocusPath, oldFocusPath: import("../..").FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
            showAlignmentOptions?: boolean;
            readOnly?: boolean;
            editingDisabled?: boolean;
            answerableCallback?: (arg1: boolean) => unknown;
            getAnotherHint?: () => unknown;
            interactionCallback?: (widgetData: {
                [widgetId: string]: any;
            }) => void;
            imagePlaceholder?: React.ReactNode;
            widgetPlaceholder?: React.ReactNode;
            baseElements?: {
                Link: React.ComponentType<any>;
            };
            imagePreloader?: (dimensions: import("../../types").Dimensions) => React.ReactNode;
            trackInteraction?: (args: {
                type: string;
                id: string;
                correct?: boolean;
            } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
                visible: number;
            }>) => void;
            customKeypad?: boolean;
            nativeKeypadProxy?: (blur: () => void) => import("@khanacademy/math-input").KeypadAPI;
            isMobile?: boolean;
            isMobileApp?: boolean;
            setDrawingAreaAvailable?: (arg1: boolean) => unknown;
            hintProgressColor?: string;
            canScrollPage?: boolean;
            editorChangeDelay?: number;
            flags?: Record<"new-radio-widget" | "image-widget-upgrade", boolean>;
        }> & {
            baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
            canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
            editorChangeDelay: NonNullable<import("../..").APIOptions["editorChangeDelay"]>;
            isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
            isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
            isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
            editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
            onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
            readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
            setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
            showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
        }>;
        keypadElement?: any;
        questionCompleted?: boolean;
        onFocus: (blurPath: import("../..").FocusPath) => void;
        onBlur: (blurPath: import("../..").FocusPath) => void;
        findWidgets: (criterion: import("../../types").FilterCriterion) => ReadonlyArray<Widget>;
        reviewMode: boolean;
        showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
        handleUserInput: (newUserInput: string, cb?: () => void, silent?: boolean) => void;
        linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
        containerSizeClass: import("../../util/sizing-utils").SizeClass;
        analytics?: {
            onAnalyticsEvent: import("@khanacademy/perseus-core").AnalyticsEventHandlerFn;
        } | undefined;
        generateUrl?: ((args: import("../..").GenerateUrlArgs) => string) | undefined;
        useVideo?: ((id: string, kind: import("../..").VideoKind) => import("@khanacademy/wonder-blocks-data").Result<{
            video: import("../..").VideoData | null | undefined;
        }>) | undefined;
    };
    render(): React.JSX.Element;
}
/**
 * @deprecated and likely a very broken API
 * [LEMS-3185] do not trust serializedState
 */
declare function getUserInputFromSerializedState(serializedState: any): PerseusExpressionUserInput;
declare function getStartUserInput(): PerseusExpressionUserInput;
declare function getOneCorrectAnswerFromRubric(rubric: PerseusExpressionRubric): string | null | undefined;
declare function getCorrectUserInput(options: PerseusExpressionWidgetOptions): PerseusExpressionUserInput;
declare const _default: {
    name: string;
    displayName: string;
    widget: React.ForwardRefExoticComponent<Omit<Pick<PerseusExpressionWidgetOptions & {
        trackInteraction: (extraData?: Empty | undefined) => void;
        widgetId: string;
        widgetIndex: number;
        alignment: string | null | undefined;
        static: boolean | null | undefined;
        problemNum: number | null | undefined;
        apiOptions: Readonly<Readonly<{
            isArticle?: boolean;
            onFocusChange?: (newFocusPath: import("../..").FocusPath, oldFocusPath: import("../..").FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
            showAlignmentOptions?: boolean;
            readOnly?: boolean;
            editingDisabled?: boolean;
            answerableCallback?: (arg1: boolean) => unknown;
            getAnotherHint?: () => unknown;
            interactionCallback?: (widgetData: {
                [widgetId: string]: any;
            }) => void;
            imagePlaceholder?: React.ReactNode;
            widgetPlaceholder?: React.ReactNode;
            baseElements?: {
                Link: React.ComponentType<any>;
            };
            imagePreloader?: (dimensions: import("../../types").Dimensions) => React.ReactNode;
            trackInteraction?: (args: {
                type: string;
                id: string;
                correct?: boolean;
            } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
                visible: number;
            }>) => void;
            customKeypad?: boolean;
            nativeKeypadProxy?: (blur: () => void) => import("@khanacademy/math-input").KeypadAPI;
            isMobile?: boolean;
            isMobileApp?: boolean;
            setDrawingAreaAvailable?: (arg1: boolean) => unknown;
            hintProgressColor?: string;
            canScrollPage?: boolean;
            editorChangeDelay?: number;
            flags?: Record<"new-radio-widget" | "image-widget-upgrade", boolean>;
        }> & {
            baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
            canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
            editorChangeDelay: NonNullable<import("../..").APIOptions["editorChangeDelay"]>;
            isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
            isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
            isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
            editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
            onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
            readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
            setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
            showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
        }>;
        keypadElement?: any;
        questionCompleted?: boolean;
        onFocus: (blurPath: import("../..").FocusPath) => void;
        onBlur: (blurPath: import("../..").FocusPath) => void;
        findWidgets: (criterion: import("../../types").FilterCriterion) => ReadonlyArray<Widget>;
        reviewMode: boolean;
        showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
        handleUserInput: (newUserInput: string, cb?: () => void, silent?: boolean) => void;
        userInput: string;
        linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
        containerSizeClass: import("../../util/sizing-utils").SizeClass;
    } & Partial<import("../..").PerseusDependenciesV2> & {
        apiOptions: NonNullable<ExternalProps["apiOptions"]>;
        buttonSets: NonNullable<ExternalProps["buttonSets"]>;
        functions: NonNullable<ExternalProps["functions"]>;
        linterContext: NonNullable<ExternalProps["linterContext"]>;
        onBlur: NonNullable<ExternalProps["onBlur"]>;
        onFocus: NonNullable<ExternalProps["onFocus"]>;
        times: NonNullable<ExternalProps["times"]>;
        visibleLabel: PerseusExpressionWidgetOptions["visibleLabel"];
        ariaLabel: PerseusExpressionWidgetOptions["ariaLabel"];
    }, "static" | "ariaLabel" | "extraKeys" | "buttonsVisible" | "trackInteraction" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "keypadElement" | "handleUserInput" | "showSolutions" | "reviewMode" | "widgetIndex" | keyof import("../..").PerseusDependenciesV2 | "alignment" | "visibleLabel" | "answerForms"> & {
        buttonSets?: import("@khanacademy/perseus-core").LegacyButtonSets | undefined;
        onFocus?: ((blurPath: import("../..").FocusPath) => void) | undefined;
        onBlur?: ((blurPath: import("../..").FocusPath) => void) | undefined;
        apiOptions?: Readonly<Readonly<{
            isArticle?: boolean;
            onFocusChange?: (newFocusPath: import("../..").FocusPath, oldFocusPath: import("../..").FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
            showAlignmentOptions?: boolean;
            readOnly?: boolean;
            editingDisabled?: boolean;
            answerableCallback?: (arg1: boolean) => unknown;
            getAnotherHint?: () => unknown;
            interactionCallback?: (widgetData: {
                [widgetId: string]: any;
            }) => void;
            imagePlaceholder?: React.ReactNode;
            widgetPlaceholder?: React.ReactNode;
            baseElements?: {
                Link: React.ComponentType<any>;
            };
            imagePreloader?: (dimensions: import("../../types").Dimensions) => React.ReactNode;
            trackInteraction?: (args: {
                type: string;
                id: string;
                correct?: boolean;
            } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
                visible: number;
            }>) => void;
            customKeypad?: boolean;
            nativeKeypadProxy?: (blur: () => void) => import("@khanacademy/math-input").KeypadAPI;
            isMobile?: boolean;
            isMobileApp?: boolean;
            setDrawingAreaAvailable?: (arg1: boolean) => unknown;
            hintProgressColor?: string;
            canScrollPage?: boolean;
            editorChangeDelay?: number;
            flags?: Record<"new-radio-widget" | "image-widget-upgrade", boolean>;
        }> & {
            baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
            canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
            editorChangeDelay: NonNullable<import("../..").APIOptions["editorChangeDelay"]>;
            isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
            isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
            isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
            editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
            onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
            readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
            setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
            showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
        }> | undefined;
        linterContext?: import("@khanacademy/perseus-linter").LinterContextProps | undefined;
        userInput?: string | undefined;
        functions?: string[] | undefined;
        times?: boolean | undefined;
    } & {}, keyof import("../..").PerseusDependenciesV2> & React.RefAttributes<Expression>>;
    version: import("@khanacademy/perseus-core").Version | undefined;
    isLintable: true;
    getOneCorrectAnswerFromRubric: typeof getOneCorrectAnswerFromRubric;
    getStartUserInput: typeof getStartUserInput;
    getCorrectUserInput: typeof getCorrectUserInput;
    getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
};
export default _default;
