import { AutoPosition, Options as AutoPositionOptions } from './useAutoPosition'; declare type Role = 'dialog' | 'alertdialog' | 'tooltip' | 'menu' | 'listbox' | 'grid' | 'tree'; declare const DefaultHoverConfig: { enabled: boolean | undefined; delay: number | Partial<{ open: number; close: number; }> | null; interactive: boolean; }; /** * Open the floating object on trigger hover. * * delay: Delay of the opening and closing. Default: 0 * * interactive: Is tooltip interactive. Should not close if receiving hover. Default: Enabled */ declare type HoverConfig = Partial | null | false; declare const DefaultRoleConfig: { enabled: boolean; role: Role | null; }; /** * Add a11y parameters to a floating object automatically based on the role * Default: Disabled */ declare type RoleConfig = Partial | null | false; declare const DefaultClickConfig: { enabled: boolean; }; /** * Auto open on click. * Default: Disabled */ declare type ClickConfig = Partial | null | false; declare const DefaultFocusConfig: { enabled: boolean; }; /** * Auto open on focus. * Default: Enabled */ declare type FocusConfig = Partial | null | false; declare const DefaultDismissConfig: { enabled: boolean; }; /** * Auto close. * Default: Enabled */ declare type DismissConfig = Partial | null | false; declare type AutoInteractionsOptions = { hover?: HoverConfig; click?: ClickConfig; focus?: FocusConfig; role?: RoleConfig; dismiss?: DismissConfig; }; export declare type Options = AutoPositionOptions & AutoInteractionsOptions; declare type AutoInteration = Omit, '_context' | '_open'> & { open: boolean; getTriggerProps: (userProps?: React.HTMLProps | undefined) => Record; getFloatProps: (userProps?: React.HTMLProps | undefined) => Record; }; /** * Wrap above useAutoPosition with interaction controls. * Based on the config updated open property * @param config Options to modify the behaviour */ export declare const useAutoInteractions: (config?: Partial) => AutoInteration; export default useAutoInteractions;