import * as React from "react"; import type { ChoiceState } from "../../types"; import type { RadioPromptJSON } from "../../widget-ai-utils/radio/radio-ai-utils"; import type { PerseusRadioChoice, PerseusRadioRubric, PerseusRadioUserInput } from "@khanacademy/perseus-core"; import type { LinterContextProps } from "@khanacademy/perseus-linter"; /** * Represents a single choice in the MultipleChoiceComponent */ export interface ChoiceType { id: string; checked: boolean; content: React.ReactNode; rationale: React.ReactNode; hasRationale: boolean; showRationale: boolean; showCorrectness: boolean; correct: boolean; isNoneOfTheAbove: boolean; previouslyAnswered: boolean; revealNoneOfTheAbove: boolean; disabled: boolean; } export type RadioProps = { numCorrect: number; hasNoneOfTheAbove?: boolean; multipleSelect?: boolean; countChoices?: boolean; deselectEnabled?: boolean; choices: RadioChoiceWithMetadata[]; choiceStates?: ChoiceState[]; editMode?: boolean; labelWrap?: boolean; randomize?: boolean; }; export type RadioWidgetHandle = { getPromptJSON(): RadioPromptJSON; }; /** * RadioChoiceWithMetadata is used for server-side scoring */ export interface RadioChoiceWithMetadata extends PerseusRadioChoice { originalIndex: number; correct?: boolean; } declare const Radio: React.ForwardRefExoticComponent void; widgetId: string; widgetIndex: number; alignment: string | null | undefined; static: boolean | null | undefined; problemNum: number | null | undefined; apiOptions: Readonly 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; }; imagePreloader?: (dimensions: import("../../types").Dimensions) => React.ReactNode; trackInteraction?: (args: { type: string; id: string; correct?: boolean; } & Partial & 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-gif-controls" | "image-widget-upgrade-scale", boolean>; }> & { baseElements: NonNullable; canScrollPage: NonNullable; editorChangeDelay: NonNullable; isArticle: NonNullable; isMobile: NonNullable; isMobileApp: NonNullable; editingDisabled: NonNullable; onFocusChange: NonNullable; readOnly: NonNullable; setDrawingAreaAvailable: NonNullable; showAlignmentOptions: NonNullable; }>; keypadElement?: any; questionCompleted?: boolean; onFocus: (blurPath: import("../..").FocusPath) => void; onBlur: (blurPath: import("../..").FocusPath) => void; findWidgets: (criterion: import("../../types").FilterCriterion) => ReadonlyArray; reviewMode: boolean; showSolutions?: import("@khanacademy/perseus-core").ShowSolutions; handleUserInput: (newUserInput: PerseusRadioUserInput, cb?: () => void, silent?: boolean) => void; userInput: PerseusRadioUserInput; linterContext: LinterContextProps; containerSizeClass: import("../../util/sizing-utils").SizeClass; } & React.RefAttributes>; export default Radio;