import React from 'react'; import { chartTypes } from '@pie-lib/charting'; import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events'; import type { ChartingValidationErrors } from '../controller/index.js'; import type { ChartingConfiguration, ChartingGraph, ChartingModel } from '../types.js'; /** A chart type the author offers: its id, label and the component that draws it */ export type ChartDefinition = ReturnType<(typeof chartTypes)['Bar']>; /** The model the author edits; `createDefaultModel()` fills it from the defaults, and the host sets `errors` from the controller's `validate()`. */ export type AuthorModel = Partial & { graph: ChartingGraph; errors?: ChartingValidationErrors; }; type MediaSupport = { add: (handler: Handler) => void; delete: (src: string, done: DeleteDone) => void; }; export type ConfigureProps = { model: AuthorModel; configuration: ChartingConfiguration; onModelChanged: (model: AuthorModel) => void; onConfigurationChanged: (configuration: ChartingConfiguration) => void; imageSupport: MediaSupport; uploadSoundSupport: MediaSupport; }; type State = { /** Steps the range can take at the chart's height */ gridValues: { range: number[]; }; /** Label steps the range's step allows */ labelValues: { range: number[]; }; }; export declare class Configure extends React.Component { constructor(props: ConfigureProps); onRationaleChange: (rationale: string) => void; onPromptChange: (prompt: string) => void; onTeacherInstructionsChange: (teacherInstructions: string) => void; onChartTypeChange: (chartType: ChartingModel["chartType"]) => void; onConfigChange: (config: Partial) => void; render(): React.JSX.Element; } export default Configure;