import { type RefObject } from "react"; import { type DragEvent } from "../../../hook/useDrag"; import type { GridState } from "../types"; /** * Options for the `useGridResize` hook. */ export type UseGridResizeOptions = { /** Reference to the current grid state (columns and rows). */ gridState: RefObject; /** Size of the drag handle (e.g., "1rem"). */ dragHandleSize: string | undefined; /** Callback to update the grid state. */ setGridState: (partialState: Partial) => void; tempGridTemplateColumns: RefObject; tempGridTemplateRows: RefObject; }; /** * Hook to handle grid resizing interactions. * Manages drag events, calculates new track sizes, and updates the DOM and state. * * @param options - Configuration options. * @returns An object containing event handlers and the ref for the grid container. * * @example * ```tsx * const { onPointerDown, dragTarget } = useGridResize({ * gridState, * dragHandleSize: "4px", * setGridState * }); * * return
; * ``` */ export declare function useGridResize({ gridState, dragHandleSize, setGridState, tempGridTemplateColumns, tempGridTemplateRows, }: UseGridResizeOptions): { onPointerDown: (event: import("react").PointerEvent) => void; onResize: (event: DragEvent) => void; dragTarget: RefObject; };