import { CellPosition } from '../../../internal/types'; import { EditableCellImperativeHandle, EditableCellCellProps } from './types'; type UseEditableMenuCellOptions = { cellPosition: CellPosition; onCellKeyDown: EditableCellCellProps["onKeyDown"]; ref: React.Ref; }; /** * Shared hook for select/multiselect editable DataTable cells that use a menu-based * editing UX (SelectMenu, MultiSelectMenu, and their async variants). * * Encapsulates the common state, refs, imperative handle, keyboard/focus/mouse handlers, * and focus context value that are identical across all four menu-based cell components. * * @param options.cellPosition - The position of the cell in the table grid * @param options.onCellKeyDown - The cell's keyDown handler from cellProps, forwarded when the menu is closed * @param options.ref - Ref for the imperative handle (invoke/focus) * @returns Shared state, refs, event handlers, and cellFocusContextValue */ export declare function useEditableMenuCell({ cellPosition, onCellKeyDown, ref, }: UseEditableMenuCellOptions): { tabIndex: number; cellRef: import('react').RefObject; triggerClickRef: import('react').MutableRefObject<(() => void) | null>; handleCellKeyDown: (event: React.KeyboardEvent, menuKeyDown: ((event: React.KeyboardEvent) => void) | undefined, isOpen: boolean) => void; handleMenuKeyDown: (e: React.KeyboardEvent) => void; handleImplicitClose: () => void; handleCellMouseDown: (triggerOnClick: () => void) => () => void; handleCellBlur: (e: React.FocusEvent) => void; handleCellFocus: (event: React.FocusEvent) => void; cellFocusContextValue: { isCellFocused: boolean; }; }; export {};