import type { DraggableAttributes } from '@dnd-kit/core'; import { type DragEvent, type RefObject, type TouchEvent } from 'react'; import type { Column } from './useTable/types.js'; interface UseHeaderCellDragAndDropParams { /** * Unique identifier for the header cell. */ headerId: string; /** * Column instanceassociated with the header cell. */ column: Column; /** * Index of the column based on the virtualization index. */ columnIndex: number; /** * Mode for column drag-and-drop functionality. */ columnDragAndDropMode: 'none' | 'enabled' | 'only'; } interface UseHeaderCellDragAndDropResult { /** * Ref to set on the draggable element. */ setNodeRef: (node: HTMLElement | null) => void; /** * Whether the header is currently being dragged. */ isDragging: boolean; /** * Ref for the portal container when dragging. */ portalRef: RefObject; /** * Props to spread on the draggable element (undefined if drag-and-drop is disabled). */ dragAndDropProps: ({ /** * Indicates that the element is draggable. */ draggable: boolean; /** * Event handler for the drag start event. */ onDragStart: (event: DragEvent) => void; /** * Event handler for the touch start event. */ onTouchStart: (event: TouchEvent) => void; /** * Event handler for the touch move event. */ onTouchMove: (event: TouchEvent) => void; } & DraggableAttributes) | undefined; } /** * Hook that encapsulates drag-and-drop functionality for header cells. * * @param params - Configuration for drag-and-drop behavior * @returns Drag-and-drop state and props to spread on the header element * @internal */ export declare function useHeaderCellDragAndDrop({ headerId, column, columnIndex, columnDragAndDropMode, }: UseHeaderCellDragAndDropParams): UseHeaderCellDragAndDropResult; export {};