import { type PerseusItem, type PerseusWidget, type PerseusWidgetsMap } from "@khanacademy/perseus-core"; /** * Get a widget type by a widget's ID * (please don't derive type from ID) * * @param {string} widgetId the ID of the widget * @param {PerseusWidgetsMap} widgetMap widget ID to widget map * @returns {string} the widget type (ie "radio") */ export declare function getWidgetTypeByWidgetId(widgetId: string, widgetMap: PerseusWidgetsMap): string | null; export declare function getWidgetSubTypeByWidgetId(widgetId: string, widgetMap: PerseusWidgetsMap): string | null; /** * Does the content have a specific type of widget? * * @param {string} type the type of the widget in question (ie "radio") * @param {string} content the string to search through * @param {PerseusWidgetsMap} widgetMap widget ID to widget map * @returns {boolean} if the content includes the widget type */ export declare function contentHasWidgetType(type: string, content: string, widgetMap: PerseusWidgetsMap): boolean; /** * Pull the widget map out of ItemData * * @param {PerseusItem} PerseusItem containing a widgetMap * @returns {WidgetMap} the widget map in the PerseusItem */ export declare function getWidgetsMapFromItemData(itemData: PerseusItem): PerseusWidgetsMap; /** * Get the widget information from a WidgetMap * * @param {string} widgetId the ID of the widget * @returns {PerseusWidget | null} the widget data if it exists, otherwise null */ export declare function getWidgetFromWidgetMap(widgetId: string, widgetMap: PerseusWidgetsMap): PerseusWidget | null; /** * Get select widgets from a widget map. * * @param {ReadonlyArray} widgetIds to extract * @param {PerseusWidgetsMap} widgetMap to extract from * @return {PerseusWidgetsMap} a new widget map with requested widgets */ export declare function getWidgetsFromWidgetMap(widgetIds: ReadonlyArray, widgetMap: PerseusWidgetsMap): PerseusWidgetsMap;