import React from 'react'; import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events'; import type { SelectTextValidationErrors } from '../controller/index.js'; import type { ComplexFeedbackType, SelectTextConfiguration, SelectTextModel, TextToken } from '../types.js'; /** The model the author edits; the host sets `errors` from the controller's `validate()`. */ export type AuthorModel = Partial & { errors?: SelectTextValidationErrors; }; export type DesignProps = { model: AuthorModel; configuration: SelectTextConfiguration; onModelChanged: (model: AuthorModel) => void; onConfigurationChanged: (configuration: SelectTextConfiguration) => void; imageSupport?: { add: (handler: ImageHandler) => void; delete: (src: string, done: DeleteDone) => void; }; uploadSoundSupport?: { add: (handler: SoundHandler) => void; delete: (src: string, done: DeleteDone) => void; }; }; type DesignState = { text: string; }; export declare class Design extends React.Component { static defaultProps: {}; constructor(props: DesignProps); componentDidMount(): void; componentDidUpdate(): void; syncMaxSelections: () => void; UNSAFE_componentWillReceiveProps(nProps: DesignProps): void; updateText: import("@pie-element/shared-lodash").CancelableFunction<(val: string) => void>; changeText: (event: React.ChangeEvent) => void | undefined; changeTokens: (tokens: TextToken[], mode: SelectTextModel["mode"]) => void; isSelectionCountHidden: () => boolean; changeMaxSelections: (_event: unknown, max: number) => void; apply: (fn: (update: AuthorModel) => void) => void; changeFeedback: (feedback: ComplexFeedbackType) => void; changePartialScoring: (partialScoring: boolean) => void; onPromptChanged: (prompt: string) => void; onTeacherInstructionsChanged: (teacherInstructions: string) => void; onRationaleChanged: (rationale: string) => void; render(): React.JSX.Element; } export default Design;