import { View } from "react-native"; import { DraggableState } from "../DndContext"; import { Data, UniqueIdentifier } from "../types"; export type DraggableConstraints = { activationDelay: number; activationTolerance: number; }; export type UseDraggableOptions = Partial & { id: UniqueIdentifier; data?: Data; disabled?: boolean; }; /** * useDraggable is a custom hook that provides functionality for making a component draggable within a drag and drop context. * * @function * @example * const { offset, setNodeRef, activeId, setNodeLayout, draggableState } = useDraggable({ id: 'draggable-1' }); * * @param {object} options - The options that define the behavior of the draggable component. * @param {string} options.id - A unique identifier for the draggable component. * @param {object} [options.data={}] - Optional data associated with the draggable component. * @param {boolean} [options.disabled=false] - A flag that indicates whether the draggable component is disabled. * @param {number} [options.activationDelay=0] - A number representing the duration, in milliseconds, that this draggable item needs to be held for before allowing a drag to start. * @param {number} [options.activationTolerance=Infinity] - A number representing the distance, in points, of motion that is tolerated before the drag operation is aborted. */ export declare const useDraggable: ({ id, data, disabled, activationDelay, activationTolerance, }: UseDraggableOptions) => { offset: import("./useSharedPoint").SharedPoint; state: import("react-native-reanimated").SharedValue; activeId: import("react-native-reanimated").SharedValue; pendingId: import("react-native-reanimated").SharedValue; setNodeLayout: (event: import("react-native").LayoutChangeEvent) => void; panGestureState: import("react-native-reanimated").SharedValue>; props: { ref: import("react").MutableRefObject; onLayout: (event: import("react-native").LayoutChangeEvent) => void; }; };