import { MenuPositionEnum } from '../constants'; import type { RefObject } from 'react'; import type { CallbackFunction } from '../types'; /** * useMenuPositioner hook * * Handle calculating and maintaining the menuHeight used by react-window. * Handle scroll animation and callback execution when menuOpen = true. * Handle resetting menuHeight back to the menuHeightDefault and callback execution when menuOpen = false. * Use ref to track if the menuHeight was resized, and if so, set the menu height back to default (avoids uncessary renders) with call to setMenuHeight. * Handle determining where to place the menu in relation to control - when menuPosition = 'top' or menuPosition = 'bottom' and there is not sufficient space below control, place on top. */ declare const useMenuPositioner: (menuRef: RefObject, controlRef: RefObject, menuOpen: boolean, menuPosition: MenuPositionEnum, menuItemSize: number, menuHeightDefault: number, menuOptionsLength: number, isMenuPortaled: boolean, onMenuOpenRef: CallbackFunction, onMenuCloseRef: CallbackFunction, menuScrollDuration?: number | undefined, scrollMenuIntoView?: boolean | undefined) => [string | undefined, number]; export default useMenuPositioner;