import { Component, ReactElement } from 'react'; import { StatefulComponent } from './util'; import { Spec } from 'immutability-helper'; declare const ModelEditorContext: import('react').Context; declare function ModelEditButton(props: any): ReactElement; interface ModelEditorProps { model: T; canEdit: boolean; isEditing: boolean; persistChanges(v: T, spec: Spec): void; } interface ModelEditorState { isEditing: boolean; isPersisting: boolean | null; error: any | null; model: T; initialModel: T; } declare class ModelEditor extends StatefulComponent, ModelEditorState> { constructor({ canEdit, ...props }: { [x: string]: any; canEdit?: boolean | undefined; }); render(): ReactElement; getValue(field: any): any; hasChanges(field: any): boolean; onChange(field: any): (value: any) => void; toggleEditing(): void; onPersistChanges(): Promise; persistChanges(spec: any | undefined): Promise; componentDidUpdate(prevProps: any): void; } declare function EditableMultilineText(props: any): React.ReactNode; declare class EditableDateField extends Component { static contextType: import('react').Context; render(): import('react').DetailedReactHTMLElement<{ className: string; }, HTMLElement> | import('react').FunctionComponentElement; } declare const useModelEditor: () => any; export { ModelEditor, ModelEditorContext, ModelEditButton, EditableMultilineText, EditableDateField, useModelEditor, };