import type { PerseusItem, PerseusWidgetsMap, PerseusRenderer } from "../data-schema"; /** * This function extracts the answers from the widgets. * * For each widget type, we first check to make sure the path to the answer exists, * then we extract the answer and add it to the list of answers. * * A list is returned because some widgets, like multi-select radio widgets and groups * can have multiple answers. * * @param {PerseusRenderer["widgets"]} widgets * @returns a list of strings that are the answers to the widgets */ export declare function getAnswersFromWidgets(widgets: PerseusRenderer["widgets"]): ReadonlyArray; /** * Inject a string equivalent of the widgets into the content. * * Content may contain Perseus widgets, that looks like this: '[[☃ Radio 1]]'. * This function replaces those widgets with its equivalent string. * * @param {string} content * @param {PerseusRenderer["widgets"]} widgets * @returns */ export declare function injectWidgets(content: string, widgets: PerseusRenderer["widgets"], widgetProps?: PerseusWidgetsMap): string; /** * Get AI-ready data from a Perseus item for Khanmigo. * * This function extracts the correct answers from widgets and injects * widget content into hints to provide Khanmigo with the context it needs * to help students without requiring React rendering. * * @param {PerseusItem} perseusItem - The Perseus item containing question and hints * @returns Object containing answers and processed hints */ export declare function getPerseusAIData(perseusItem: PerseusItem): { answers: ReadonlyArray; hints: ReadonlyArray; };