import type { FC, PropsWithChildren } from "react"; interface ClickAwayContextType { registerElement(element: HTMLElement): void; unregisterElement(element: HTMLElement): void; } export declare const useClickAwayContext: () => ClickAwayContextType | null; export type ClickAwayContainerProps = PropsWithChildren<{ /** * The element that should be registered in the ClickAway tree. * To ensure proper tracking, the element should be tracked in a way that triggers a rerender (use callback refs!) */ element: HTMLElement | null; /** * Will be called if a click away event (mousedown, touchstart, focusin) * happens outside of the subtree tracked by this component instance */ onClickAway?(evt: Event): void; }>; /** * ClickAwayContainer is a low-level, compound component. It doesn't render anything apart from its children. * Its goal is to construct a tree of ClickAway-able React components (e.g. nested dropdown). * * Most libraries handling "click outside" functionality assume that the dom tree matches the React tree, * but it's not the case when using portals. * This component allows click-away functionality even when portals are involved. * * See the [Click Away Container documentation page](https://satellite.algolia.com/8261d6576/p/281cd4-click-away-container) for more information. * * @deprecated This component is deprecated and will be removed in a future version. * Please use the Popover component, which provides built-in click-away behavior and is more accessible. */ export declare const ClickAwayContainer: FC; export {};