import React, { ComponentType, RefObject, Ref } from 'react'; export interface IWrappedComponentProps { /** * Видимость компонента. */ visible?: boolean; /** * Ссылка на DOM элемент, в рамках которого не нужно отслеживать клик. */ targetRef?: Ref; } export interface IWithOutsideClickProps extends IWrappedComponentProps { /** * Обработчик вызывающийся после того, как произошло нажатие на escape. */ onEscapeKeyDown?: (event: KeyboardEvent) => void; /** * Обработчик вызывающийся после того, как произошел клик вне компонента. */ onOutsideClick?: (event: MouseEvent) => void; /** * Ссылки на DOM элементы, в рамках которых не нужно отслеживать клик. */ ignoreRefs?: RefObject[]; } export declare const withOutsideClick: (WrappedComponent: React.ComponentType) => React.ComponentType;