import { MouseEvent, Dispatch, SetStateAction } from 'react'; /** * Custom hook to manage the state of a popover. * * @returns {UsePopoverReturn} - An object containing: * - `open`: A boolean indicating whether the popover is open. * - `anchorEl`: The current element that the popover is anchored to. * - `onClose`: A function to close the popover. * - `onOpen`: A function to open the popover. * - `setAnchorEl`: A function to manually set the anchor element. * * @example * const { open, anchorEl, onOpen, onClose } = usePopover(); * * return ( * <> * * * * Popover content * * * ); */ type UsePopoverReturn = { open: boolean; anchorEl: T | null; onClose: () => void; onOpen: (event: MouseEvent) => void; setAnchorEl: Dispatch>; }; declare function usePopover(): UsePopoverReturn; export { type UsePopoverReturn, usePopover };