import * as React from "react";
import type { Focusable, Widget, WidgetProps } from "../../types";
import type { NumericInputPromptJSON } from "../../widget-ai-utils/numeric-input/prompt-utils";
import type { PerseusNumericInputAnswerForm, PerseusNumericInputRubric, PerseusNumericInputUserInput, PerseusNumericInputWidgetOptions } from "@khanacademy/perseus-core";
type ExternalProps = WidgetProps<PerseusNumericInputWidgetOptions, PerseusNumericInputUserInput>;
export type NumericInputProps = ExternalProps & {
    size: NonNullable<ExternalProps["size"]>;
    rightAlign: NonNullable<ExternalProps["rightAlign"]>;
    apiOptions: NonNullable<ExternalProps["apiOptions"]>;
    coefficient: NonNullable<ExternalProps["coefficient"]>;
    answerForms: ReadonlyArray<PerseusNumericInputAnswerForm>;
    labelText: string;
    linterContext: NonNullable<ExternalProps["linterContext"]>;
};
type DefaultProps = Pick<NumericInputProps, "size" | "rightAlign" | "apiOptions" | "coefficient" | "answerForms" | "labelText" | "linterContext" | "userInput">;
/**
 * The NumericInput widget is a numeric input field that supports a variety of
 * answer forms, including integers, decimals, fractions, and mixed numbers.
 *
 * [Jan 2025] We're currenly migrating from class-based components to functional
 * components. While we cannot fully migrate this component yet, we can start
 * by using the functional component for the rendering the UI of the widget.
 */
export declare class NumericInput extends React.Component<NumericInputProps> implements Widget {
    inputRef: React.RefObject<Focusable>;
    static defaultProps: DefaultProps;
    focus: () => boolean;
    focusInputPath: () => void;
    blurInputPath: () => void;
    getInputPaths: () => ReadonlyArray<ReadonlyArray<string>>;
    /**
     * Returns the JSON representation of the prompt for this widget.
     * This is used by the AI to determine the prompt for the widget.
     */
    getPromptJSON(): NumericInputPromptJSON;
    /**
     * @deprecated and likely very broken API
     * [LEMS-3185] do not trust serializedState
     */
    getSerializedState(): {
        currentValue: string;
        labelText: string;
        size: string;
        coefficient: boolean;
        rightAlign: boolean;
        static: boolean;
        trackInteraction: (extraData?: Empty | undefined) => void;
        widgetId: string;
        widgetIndex: number;
        alignment: string | 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: PerseusNumericInputUserInput, cb?: () => void, silent?: boolean) => void;
        linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
        containerSizeClass: import("../../util/sizing-utils").SizeClass;
        answerForms: ReadonlyArray<PerseusNumericInputAnswerForm>;
    };
    render(): React.ReactNode;
}
declare function getStartUserInput(): PerseusNumericInputUserInput;
/**
 * @deprecated and likely a very broken API
 * [LEMS-3185] do not trust serializedState
 */
declare function getUserInputFromSerializedState(serializedState: any): PerseusNumericInputUserInput;
export declare function findPrecision(value: number): number;
export declare function findCommonFractions(value: number): {
    num: number;
    denom: number;
} | undefined;
declare function getCorrectUserInput(options: PerseusNumericInputWidgetOptions): PerseusNumericInputUserInput;
declare const _default: {
    name: string;
    displayName: string;
    widget: typeof NumericInput;
    isLintable: true;
    getCorrectUserInput: typeof getCorrectUserInput;
    getOneCorrectAnswerFromRubric(rubric: PerseusNumericInputRubric): string | null | undefined;
    getStartUserInput: typeof getStartUserInput;
    getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
};
export default _default;
