import { type SharedValue } from 'react-native-reanimated'; /** * Configuration for useDropHandler hook. */ export interface UseDropHandlerConfig { /** Item ID for identity check */ itemId: string; /** This item's translateY SharedValue (from useDragGesture) */ translateY: SharedValue; } /** * Callbacks for useDropHandler. */ export interface UseDropHandlerCallbacks { /** Called when reorder should occur (with index delta) */ onReorderByDelta?: (itemId: string, delta: number) => void; /** Optional haptic feedback callback */ onHapticFeedback?: (type: 'light' | 'medium') => void; /** Called to clear the safety timeout */ clearSafetyTimeout: () => void; /** Called to start failsafe cleanup timeout */ failsafeCleanup: () => void; } /** * Return value from useDropHandler hook. */ export interface UseDropHandlerResult { /** Handle drag end - calculates position and triggers reorder */ handleDragEnd: (positionDelta: number, startIndex: number) => void; /** Reset drop state (called as safety fallback) */ resetDropState: () => void; } /** * Hook that handles drop logic, including position calculation, reorder triggering, * and state reset. * * This hook is responsible for: * - Calculating whether position actually changes on drop * - Storing pending reorder data for animation completion * - Triggering the reorder callback after animation * - Resetting drag state after drop completes * * @param config - Configuration with itemId and translateY * @param callbacks - Callbacks for reorder, haptic feedback, and cleanup * @returns Functions for handling drag end and resetting drop state */ export declare function useDropHandler(config: UseDropHandlerConfig, callbacks: UseDropHandlerCallbacks): UseDropHandlerResult; //# sourceMappingURL=useDropHandler.d.ts.map