import { ComponentType } from 'react';
export interface DataViewerProps<T> {
    value: T | undefined;
    placeholder?: string;
}
export interface DataEditorProps<T> {
    value: T | undefined;
    onChange: (value: any, autoSave?: boolean) => void;
    onSave?: () => void;
    onCancel?: () => void;
}
interface EditableProps<T> {
    value: T;
    viewer: ComponentType<DataViewerProps<T>>;
    editor: ComponentType<DataEditorProps<T>>;
    isEditing?: boolean;
    placeholder?: string;
    onChange: (value: T) => boolean;
    onDelete?: () => void;
    outlineOnHover?: boolean;
    editOnClick?: boolean;
    skipClickOutside?: (e: MouseEvent) => boolean;
    readonly?: boolean;
    /**
     * An optional validation function that returns an error message if the value is invalid.
     *
     * @returns An error message or undefined if the value is valid.
     */
    onValidate?: (value: T) => string | undefined;
}
export declare function Editable<T>({ value, onChange, onDelete, outlineOnHover, editOnClick, placeholder, viewer, editor, skipClickOutside, isEditing, readonly, onValidate, }: EditableProps<T>): import("react/jsx-runtime").JSX.Element;
export declare function TextDataViewer({ value, placeholder }: DataViewerProps<string>): import("react/jsx-runtime").JSX.Element;
export declare function TextDataEditor({ value, onChange, onCancel, onSave }: DataEditorProps<string>): import("react/jsx-runtime").JSX.Element;
interface EditableTextProps extends Omit<EditableProps<string>, 'viewer' | 'editor'> {
    viewer?: ComponentType<DataViewerProps<string>>;
    editor?: ComponentType<DataEditorProps<string>>;
}
export declare function EditableText(props: EditableTextProps): import("react/jsx-runtime").JSX.Element;
export {};
//# sourceMappingURL=Editable.d.ts.map