import React, { ReactElement } from "react"; import { Container, DragObjectWithType } from "../../../types"; import { ConnectDragSource, DragSourceMonitor } from "react-dnd"; export type DraggableChildrenFunction = (params: { isDragging: boolean; drag: ConnectDragSource; }) => ReactElement; export interface BeginDragProps { ui?: "row" | "field" | "step"; pos?: { row: number; index?: number; }; name?: string; id?: string; container?: Container; } export type BeginDrag = (props: BeginDragProps, monitor: DragSourceMonitor) => void; export type EndDrag = (item: DragObjectWithType, monitor: DragSourceMonitor) => void; export interface DraggableProps extends BeginDragProps { children: DraggableChildrenFunction; beginDrag?: BeginDrag | BeginDragProps; endDrag?: EndDrag; target?: string[]; } declare const _default: React.MemoExoticComponent<(props: DraggableProps) => React.JSX.Element>; export default _default;