import type { TreeNodeData } from '@primereact/types/headless/tree'; /** * Registered by the source tree at `startDrag`; the destination invokes it on a * committed drop so the source can drop the node and fire its `onMove`. */ export type SourceCommitHandler = (originalEvent: React.DragEvent) => void; type DragState = { isDragging: boolean; dragNode: TreeNodeData | null; dragScope: string | string[] | null; dragNodeSubNodes: TreeNodeData[] | null; dragNodeIndex: number | null; sourceTreeId: string | null; /** Source-tree commit hook. Invoked by the destination tree on a successful drop. */ sourceCommit: SourceCommitHandler | null; }; type DragEvent = { node: TreeNodeData; scope?: string | string[] | null; subNodes?: TreeNodeData[]; index?: number; sourceTreeId?: string; sourceCommit?: SourceCommitHandler; }; export declare const TreeDragDropService: { getDragState(): DragState; startDrag(event: DragEvent): void; stopDrag(event: DragEvent): void; onDragStart(handler: (event: DragEvent) => void): () => boolean; onDragStop(handler: (event: DragEvent) => void): () => boolean; }; export {};