import { CSSProperties, ReactNode } from 'react'; import { AvoidElement, OffsetXY, Placement } from '../../hooks/useFloatingPosition'; import { CardBackgroundProps } from '../CardBackground/CardBackground'; type TriggerAction = "hover" | "click" | "doubleClick" | "contextMenu"; type PixelUnit = `${number}px`; type PercentUnit = `${number}%`; type XPosition = "left" | "center" | "right" | PixelUnit | PercentUnit | number; type PopoverRenderFn = (context: TContext | undefined) => ReactNode; type PopoverChildren = ReactNode | PopoverRenderFn; export interface PopoverHandle { open: () => void; close: () => void; readonly isOpen: boolean; } interface PopoverPropsBase { triggerRef: React.RefObject; trigger?: TriggerAction; hoverDelay?: number; attachToParent?: boolean; highLightTrigger?: boolean; highLightStyles?: CSSProperties; highLightClassName?: string; className?: string; hideIndicator?: boolean; /** @deprecated Usar `placement`. Mapeado automáticamente. */ xPosition?: XPosition; /** @deprecated No hace nada. */ debugMode?: boolean; placement?: Placement; /** Gap lateral (número) o traslación viewport `{ x, y }`. Con `placement="center"` el default es `{ x: 0, y: 0 }`. */ offset?: number | OffsetXY; anchorRef?: React.RefObject; avoidElements?: AvoidElement[]; zIndex?: number; onOpen?: () => void; onClose?: () => void; indicatorOffset?: number; cardBackground?: Omit; } export interface PopoverProps extends PopoverPropsBase { children: PopoverChildren; context?: TContext; } type PopoverComponent = { (props: PopoverProps & { ref?: React.ForwardedRef; }): React.ReactElement | null; }; declare const Popover: PopoverComponent; export default Popover; export type { AvoidElement, OffsetXY, Placement };