/**
* A hook that manages hover-based popover behavior with configurable delays.
* Provides hover detection for both trigger and content elements with debounced state management.
*
* @param options - Configuration options for the hover delays
* @param options.onDelayMs - Delay in milliseconds before showing the popover (default: 300)
* @param options.offDelayMs - Delay in milliseconds before hiding the popover (default: 400)
*
* @returns An object containing:
* - isOpen: Boolean indicating if the popover is visible
* - setIsOpen: Function to manually control popover visibility
* - triggerProps: Props to spread on the trigger element (onMouseEnter, onMouseLeave, onClick)
* - contentProps: Props to spread on the popover content (onMouseEnter, onMouseLeave)
*
* @example
* ```tsx
* const { isOpen, triggerProps, contentProps } = useHoverPopover({
* onDelayMs: 200,
* offDelayMs: 300
* });
*
* return (
*
* Hover me
* Popover content
*
* );
* ```
*/
export declare const useHoverPopover: ({ onDelayMs, offDelayMs, }?: {
onDelayMs?: number;
offDelayMs?: number;
}) => {
readonly isOpen: boolean;
readonly setIsOpen: (o: boolean) => void;
readonly triggerProps: {
readonly onMouseEnter: () => void;
readonly onMouseLeave: () => void;
readonly onClick: (e: React.MouseEvent) => void;
};
readonly contentProps: {
readonly onMouseEnter: () => void;
readonly onMouseLeave: () => void;
};
};