import { Table as ReactTable } from "@tanstack/react-table"; import { HTMLAttributes, ReactNode } from "react"; interface ColumnDragDropOptions { table: ReactTable; onColumnDragStart?: (columnId: string) => void; } type ColumnStyles = { [x: string]: number | string | undefined; }; /** * Hook for handling column drag and drop functionality in a table. * * @param options - Options for the hook. * @param options.table - The ReactTable instance. * @param options.onColumnDragStart - Optional callback when column drag starts. * @returns {object} Object containing drag state and handler functions. */ export declare const useColumnDragDrop: ({ table, onColumnDragStart, }: ColumnDragDropOptions) => { draggingColumnId: string | null; droppedColumnId: string | null; dropTargetColumnId: string | null; dropPosition: "left" | "right" | null; getHeaderProps: (headerId: string, styles?: ColumnStyles) => HTMLAttributes; getDragHandleProps: (headerId: string, isPlaceholder: boolean, pinned?: "left" | "right" | "") => HTMLAttributes; renderDropIndicator: (columnId: string) => ReactNode; isCellDropTarget: (columnId: string) => boolean; getCellProps: (columnId: string, styles?: ColumnStyles) => HTMLAttributes; }; export {};