import React from 'react'; import type { Action, DragHandleInteractionState, StateTransitionCallbacks, UseDragHandleInteractionStateProps } from './interfaces'; export { UseDragHandleInteractionStateProps }; export declare function calculateNextState(state: DragHandleInteractionState, action: Action): DragHandleInteractionState; export declare function getCallbacksForTransition(prevState: DragHandleInteractionState, nextState: DragHandleInteractionState): StateTransitionCallbacks[]; /** * Manages interaction states for drag handle components. * * The hook implements a state machine for drag handles that supports: * - Pointer-based drag-and-drop (DnD) interactions * - Keyboard-based universal access pattern (UAP) interactions * - State transitions with appropriate callbacks * - Metadata passing between states * * States: * - null: Idle state with no active interaction * - dnd-start: Initial pointer down, beginning of potential drag * - dnd-active: Active dragging with pointer movement * - dnd-end: Completed drag operation * - uap-action-start: Keyboard/accessibility action initiated * - uap-action-end: Keyboard/accessibility action completed */ export default function useDragHandleInteractionState(props?: UseDragHandleInteractionStateProps, options?: { debug: boolean; }): { interaction: DragHandleInteractionState; processPointerDown: (event: PointerEvent, metadata?: T) => void; processPointerMove: (event: PointerEvent) => void; processPointerUp: (event: PointerEvent) => void; processPointerCancel: () => void; processKeyDown: (event: React.KeyboardEvent, metadata?: T) => void; processFocus: () => void; processBlur: () => void; };