/**
 * @file useTooltip.tsx
 * @input Uses useLayer, React hooks
 * @output Exports useTooltip hook for hover/focus triggered tooltips
 * @position Layer hook; builds on useLayer for tooltip behavior
 *
 * SYNC: When modified, update:
 * - /packages/core/src/Tooltip/index.ts
 */
import { type ReactNode, type RefCallback } from 'react';
import { type ContextRenderProps, type LayerAlignment, type LayerPlacement } from '../Layer/useLayer';
/**
 * Focus trigger behavior for tooltips
 */
export type TooltipFocusTrigger = 'auto' | 'always' | 'never';
export interface TooltipOptions {
    /**
     * Position placement relative to anchor
     * @default 'above'
     */
    placement?: LayerPlacement;
    /**
     * Alignment along the placement axis
     * @default 'center'
     */
    alignment?: LayerAlignment;
    /**
     * Delay before showing on hover (ms)
     * @default 200
     */
    delay?: number;
    /**
     * Delay before hiding after mouse/focus leave (ms)
     * @default 0
     */
    hideDelay?: number;
    /**
     * When to trigger on focus:
     * - `auto`: Only if element is naturally focusable
     * - `always`: Always attach focus listeners
     * - `never`: Never attach focus listeners (for composite widgets)
     *
     * @default 'auto'
     */
    focusTrigger?: TooltipFocusTrigger;
    /**
     * Whether the tooltip is enabled.
     * When false, hover/focus triggers are disabled.
     *
     * @default true
     */
    isEnabled?: boolean;
    /**
     * Controlled open state. When provided, overrides hover/focus triggers:
     * - `true`: force-show the tooltip (hover/focus hide is suppressed)
     * - `false`: force-hide the tooltip
     * - `undefined`: uncontrolled — hover/focus triggers manage visibility
     */
    isOpen?: boolean;
    /**
     * Whether the tooltip should be shown on mount.
     * The tooltip is still dismissible — this just opens it initially.
     */
    isDefaultOpen?: boolean;
    /**
     * Callback fired when tooltip is shown.
     * Wrap in useCallback for stable identity.
     */
    onShow?: () => void;
    /**
     * Callback fired when tooltip is hidden.
     * Wrap in useCallback for stable identity.
     */
    onHide?: () => void;
}
export interface TooltipReturn {
    /**
     * Combined ref that sets both position and interaction on the same element.
     * Shorthand for calling both positionRef and interactionRef.
     */
    ref: RefCallback<HTMLElement>;
    /**
     * Ref for the positioning anchor element.
     * Injects anchorName style for CSS anchor positioning.
     */
    positionRef: RefCallback<HTMLElement>;
    /**
     * Ref for the interaction element.
     * Attaches hover/focus event listeners via addEventListener.
     * Can be the same element as positionRef or different.
     */
    interactionRef: RefCallback<HTMLElement>;
    /**
     * The CSS anchor name to use for positioning.
     * Use this when you need to set anchorName manually (e.g., display:contents wrapper).
     */
    anchorId: string;
    /**
     * ID for aria-describedby on the trigger element.
     * Caller should compose with other IDs using mergeIds utility.
     */
    describedBy: string;
    /**
     * Render function for tooltip content.
     * Returns anchor-positioned popover element.
     *
     * `positioning` is excluded: the tooltip always derives its position from
     * placement/alignment, so accepting the custom opt-out here would be a
     * silent no-op.
     */
    renderTooltip: (children: ReactNode, props?: Omit<ContextRenderProps, 'positioning'>) => ReactNode;
}
/**
 * Hook for tooltip behavior with hover/focus triggers.
 *
 * Builds on useLayer to add:
 * - Hover triggers with configurable delay
 * - Focus triggers with auto-detection for focusable elements
 * - Inverted color palette for high contrast
 *
 * Unlike HoverCard, tooltips:
 * - Don't stay open when hovering the tooltip content
 * - Have shorter delays
 * - Use inverted colors (dark background, light text)
 * - Are typically used for short, non-interactive text
 *
 * @example
 * ```
 * const tooltip = useTooltip({ placement: 'above' });
 * <Button ref={tooltip.ref} aria-describedby={tooltip.describedBy}>
 *   Hover me
 * </Button>
 * {tooltip.renderTooltip('Helpful tooltip text')}
 * ```
 */
export declare function useTooltip(options?: TooltipOptions): TooltipReturn;
//# sourceMappingURL=useTooltip.d.ts.map