///
import { QueryCallbacksFor, Delete, PatchListenerAction } from '@ws-ui/craftjs-utils';
import { Placement } from './events';
import { Nodes, NodeEventTypes, NodeId, Node, UserComponent } from './nodes';
import { QueryMethods } from '../editor/query';
import { EditorStore, ActionMethodsWithConfig } from '../editor/store';
import { useInternalEditorReturnType } from '../editor/useInternalEditor';
import { CoreEventHandlers } from '../events';
export type Options = {
onRender: React.ComponentType<{
render: React.ReactElement;
}>;
onBeforeMoveEnd: (targetNode: Node, newParentNode: Node, existingParentNode: Node) => void;
onNodesChange: (query: QueryCallbacksFor) => void;
resolver: Resolver;
fallback?: UserComponent;
enabled: boolean;
indicator: Partial<{
success: string;
error: string;
transition: string;
thickness: number;
className: string;
style: React.CSSProperties;
}>;
handlers: (store: EditorStore) => CoreEventHandlers;
normalizeNodes: (state: EditorState, previousState: EditorState, actionPerformed: Delete, 'patches'>, query: QueryCallbacksFor) => void;
};
export type Resolver = Record;
export interface Indicator {
placement: Placement;
error: string | null;
}
export type EditorEvents = Record>;
export type EditorState = {
nodes: Nodes;
events: EditorEvents;
options: Options;
indicator: Indicator;
};
export type ConnectedEditor = useInternalEditorReturnType;