import { RefObject } from 'react'; export type SwipeDirection = 'left' | 'right' | 'up' | 'down'; export interface SwipeInfo { dx: number; dy: number; dt: number; } export interface SwipeOptions { minDistance?: number; maxDurationMs?: number; onSwipe?: (dir: SwipeDirection, info: SwipeInfo) => void; } export interface SwipeState { swiping: boolean; dir: SwipeDirection | null; } /** * A hook that detects swipe gestures on an element. * @param ref React ref object for the target element * @param opts Configuration options * @returns Object containing swipe state * * @example * const ref = useRef(null); * const { swiping, dir } = useSwipe(ref, { * minDistance: 50, * onSwipe: (dir, info) => console.log(dir, info) * }); */ export declare function useSwipe(ref: RefObject, opts?: SwipeOptions): SwipeState;