export declare type MouseEvents = { [K in keyof GlobalEventHandlersEventMap]: GlobalEventHandlersEventMap[K] extends MouseEvent ? K : never; }[keyof GlobalEventHandlersEventMap]; export declare const getRefElement: (ele: HTMLElement | string) => HTMLElement | null; export declare const isMouseRootClose: (e: any, context: any) => boolean; export interface IRootCloseOptions { disabled?: boolean; clickTrigger?: MouseEvents; } /** * The `useRootClose` hook registers your callback on the document * when rendered. Powers the `` component. This is used achieve modal * style behavior where your callback is triggered when the user tries to * interact with the rest of the document or hits the `esc` key. * * @param {HTMLElement[]} elements elements that exclude onClose event * @param {function} onRootClose * @param {object=} options * @param {boolean=} options.disabled * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on */ declare function useRootClose(elements: (HTMLElement | null)[], onRootClose: (e: Event) => void, { disabled, clickTrigger }?: IRootCloseOptions): void; export default useRootClose;