import { RefObject, Dispatch, SetStateAction } from 'react'; /** * Custom hook to manage the state of a popover that opens on hover. * * @param {RefObject} [inputRef] - An optional ref object to use for the popover element. * * @returns {UsePopoverHoverReturn} - An object containing: * - `open`: A boolean indicating whether the popover is open. * - `onOpen`: A function to open the popover. * - `anchorEl`: The current element that the popover is anchored to. * - `onClose`: A function to close the popover. * - `elementRef`: A ref object for the popover element. * - `setOpen`: A function to manually set the open state of the popover. * * @example * const { open, onOpen, onClose, elementRef } = usePopoverHover(); * * return ( * <> * * * * Popover content * * * ); */ type UsePopoverHoverReturn = { open: boolean; anchorEl: T | null; onOpen: () => void; onClose: () => void; elementRef: RefObject; setOpen: Dispatch>; }; declare function usePopoverHover(inputRef?: RefObject): UsePopoverHoverReturn; export { usePopoverHover };