import type { SimplePosition } from "@react-md/utils"; /** * @remarks \@since 2.8.0 */ export interface TooltipPositionHookOptions { /** * An optional controlled position to use that will disable the functionality * to determine the "best" position to render the tooltip within the viewport. */ position?: SimplePosition; /** * An optional position to use before the positioning calculation has * occurred. This is also used to determine if the position should be * horizontal vs vertical. * * Vertical - `"below"` or `"above"` * Horizontal - `"left"` or `"right"` * * @defaultValue `"below"` */ defaultPosition?: SimplePosition; /** * This value should be between 0 and 1 and will be multiplied by either the * viewport height or viewport width to determine the best position to render * the tooltip based on available space within the viewport. * * You _probably_ won't ever really need to update this value. */ threshold?: number; } /** * @internal * @remarks \@since 2.8.0 */ export declare type UpdateTooltipPosition = (container: HTMLElement) => void; /** * @internal * @remarks \@since 2.8.0 */ export declare type TooltipPositionHookReturnValue = [ SimplePosition, UpdateTooltipPosition ]; /** * A hook that's used to determine the "best" position to render the tooltip * within the viewport. * * @internal * @remarks \@since 2.8.0 */ export declare function useTooltipPosition({ position: determinedPosition, defaultPosition, threshold, }: TooltipPositionHookOptions): TooltipPositionHookReturnValue;