import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';
export interface IDraggableLocation {
droppableId: string;
index: number;
}
export interface IDragStart {
draggableId: string;
source: IDraggableLocation;
}
export interface IDragUpdate {
draggableId: string;
source: IDraggableLocation;
destination: IDraggableLocation | null;
}
export interface IDropResult {
draggableId: string;
source: IDraggableLocation;
destination: IDraggableLocation | null;
reason: 'DROP' | 'CANCEL';
}
interface IDragDropContextProps {
children: ReactNode;
onDragStart?: (start: IDragStart) => void;
onDragUpdate?: (update: IDragUpdate) => void;
onDragEnd?: (result: IDropResult) => void | Promise;
}
interface IDroppableProps {
droppableId: string;
isDropDisabled?: boolean;
direction?: 'vertical' | 'horizontal';
isCombineEnabled?: boolean;
ignoreContainerClipping?: boolean;
children: (provided: {
innerRef: (element: HTMLDivElement | null) => void;
droppableProps: HTMLAttributes;
placeholder: ReactNode;
}, snapshot: {
isDraggingOver: boolean;
}) => ReactNode;
}
interface IDraggableProps {
draggableId: string;
index: number;
isDragDisabled?: boolean;
children: (provided: {
innerRef: (element: HTMLDivElement | null) => void;
draggableProps: HTMLAttributes & {
style?: CSSProperties;
draggable?: boolean;
};
dragHandleProps: HTMLAttributes;
}, snapshot: {
isDragging: boolean;
draggingOver?: string;
}) => ReactNode;
}
export declare function DragDropContext(props: IDragDropContextProps): import("react/jsx-runtime").JSX.Element;
export declare function Droppable(props: IDroppableProps): import("react/jsx-runtime").JSX.Element;
export declare function Draggable(props: IDraggableProps): ReactNode;
export {};