import { type SetStateAction } from 'react'; /** * Sorts all rows for which drag and drop should be disabled by default to either the start or end of the DataTable. * * @param props - The object containing the initial row order, the set of rows for which * drag and drop should be disabled, and the position to which disabled rows should be * sorted and locked. * @returns - An object containing the set of rows for which drag and drop should be disabled, the adapted row order * with disabled rows sorted to the start or end of the table, and the function to update the row order * on drag and drop. * @public */ export declare function useLockedRowOrder(props: { /** * Ordered set of row ids representing the initial row order. */ initialRowOrder: string[]; /** * Ids of the rows for which drag and drop is disabled and which are grouped and locked at the `position`. */ lockedRows: string[]; /** * Where the locked rows are grouped: `'start'` for the top of the table, `'end'` for the bottom. * @defaultValue 'start' */ position?: 'start' | 'end'; /** * Optional tooltip shown when a locked row's drag handle is disabled. Pass a string to * use the same tooltip for every locked row, or a function that receives the row data and * returns a per-row message (or `undefined` for no tooltip). * * @remarks If passing a function, ensure it is stable across renders (e.g. wrap it with * `useCallback` or define it outside the component) — an unstable reference triggers * unnecessary re-renders. */ disabledRowDragAndDropTooltip?: string | ((row: TData) => string | undefined); }): { rowOrdering: { enableDragAndDrop: boolean; disableRowDragAndDrop: (row: any) => boolean; lockDisabledRows: "end" | "start"; disabledRowDragAndDropTooltip: string | ((row: TData) => string | undefined) | undefined; }; rowOrder: string[]; setRowOrder: (updater: SetStateAction) => void; }; //# sourceMappingURL=useLockedRowOrder.d.ts.map