import * as React from 'react';
import type { HasRootRef } from '../types';
type InjectProps<T> = React.HTMLAttributes<T> & React.Attributes & {
    ref?: React.Ref<T>;
};
type ExpectedReactElement<T> = React.ReactElement<HasRootRef<T> & React.DOMAttributes<T>>;
type ChildrenElement<T> = ExpectedReactElement<T> | React.ReactNode;
/**
 * Хук позволяет пропатчить переданный компонент так, чтобы можно было получить ссылку на его
 * DOM-элемент. Также есть возможность прокинуть дополнительные параметры.
 *
 * @param children
 * @param injectProps
 * @param externRef – полезен когда нужно прокинуть `ref` элементу выше.
 *
 * 👎 Без параметра `externRef`
 * ```ts
 * const { ref } = useSomeHook();
 * const [childRef, child] = usePatchChildren(children);
 * React.useLayoutEffect(() => {
 *   ref.current = childRef.current; // или ref.current(childRef.current)
 * }, [childRef]);
 * ```
 *
 * 👍 С параметром `externRef`
 * ```ts
 * const { ref } = useSomeHook();
 * const [childRef, child] = usePatchChildren(children, undefined, ref);
 * ```
 */
export declare const usePatchChildren: <ElementType extends HTMLElement = HTMLElement>(children?: ChildrenElement<ElementType>, injectProps?: InjectProps<ElementType>, externRef?: React.Ref<ElementType>) => [React.RefObject<ElementType | null>, ChildrenElement<ElementType> | undefined];
export {};
//# sourceMappingURL=usePatchChildren.d.ts.map