import { DOMAttributes, SyntheticEvent, MutableRefObject } from 'react'; declare type HTMLElRef = MutableRefObject; declare type CustomEvent = { event?: SyntheticEvent; portal: HTMLElRef; targetEl: HTMLElRef; } & SyntheticEvent; declare type CustomEventHandler = (customEvent: CustomEvent) => void; declare type CustomEventHandlers = { [K in keyof DOMAttributes]?: CustomEventHandler; }; export declare type UsePortalOptions = { closeOnOutsideClick?: boolean; closeOnEsc?: boolean; bindTo?: HTMLElement; isOpen?: boolean; onOpen?: CustomEventHandler; onClose?: CustomEventHandler; onPortalClick?: CustomEventHandler; programmaticallyOpen?: boolean; } & CustomEventHandlers; export declare const errorMessage1 = "You must either add a `ref` to the element you are interacting with or pass an `event` to openPortal(e) or togglePortal(e) when the `programmaticallyOpen` option is not set to `true`."; export default function usePortal({ closeOnOutsideClick, closeOnEsc, bindTo, // attach the portal to this node in the DOM isOpen: defaultIsOpen, onOpen, onClose, onPortalClick, programmaticallyOpen, ...eventHandlers }?: UsePortalOptions): any; export {};