import type React from 'react';
import type { CurrencyInputProps } from '../components/CurrencyInput';
import type { PasswordInputProps } from '../components/PasswordInput';
import type { InputProps } from '../components/Input';
import type { AutocompleteProps } from '../components/Autocomplete';
import type { FxInputProps } from '../components/FxInput';
import type { SelectProps } from '../components/Select';
import type { DropdownProps } from '../components/Dropdown';
import type { DropdownMenuProps } from '../components/DropdownMenu';
import type { ButtonProps } from '../components/Button';
import type { TooltipProps } from '../components/Tooltip';
import type { HintProps } from '../components/Hint';
export { delay } from './delay';
export type Defaultize<P, D> = P extends any ? string extends keyof P ? P : Pick<P, Exclude<keyof P, keyof D>> & Partial<Pick<P, Extract<keyof P, keyof D>>> & Partial<Pick<D, Exclude<keyof D, keyof P>>> : never;
export type DefaultizeProps<C, P> = C extends {
    defaultProps: infer D;
} ? Defaultize<P, D> : P;
export type AnyObject = Record<string, unknown>;
export type NoInfer<T> = T extends infer U ? U : never;
export declare const emptyHandler: () => void;
export declare class CancelationError extends Error {
    code: string;
}
export declare function taskWithDelay(task: () => void, ms: number): () => void;
export type FunctionWithParams<R = any> = (...args: any[]) => R;
export declare function isFunction<T>(x: T | FunctionWithParams): x is FunctionWithParams;
export declare function isFunctionalComponent(Component: unknown): Component is React.ComponentType;
export declare function isClassComponent(Component: unknown): Component is React.ComponentType;
export declare function isIntrinsicElement(element: React.ReactElement): boolean;
export declare function isRefableElement(element: React.ReactElement): boolean;
export declare function escapeRegExpSpecChars(s: string): string;
export declare const getRandomID: () => string;
export declare const isExternalLink: (link: string) => boolean;
/**
 * Check if the given ReactNode is an element of the specified ReactUI component
 */
export declare const isReactUINode: (componentName: string, node: React.ReactNode) => boolean;
export declare const formatBytes: (bytes: number, decimals?: number) => string | null;
/**
 * Проверяет, не является ли переданный аргумент null или undefined и исключает типы null и undefined из типа аргумента
 *
 * @param value Значение, которое нужно проверить и исключить из него типы
 * @returns Возвращает true, если переданный аргумент не является null или undefined иначе false
 */
export declare const isNonNullable: <T>(value: T) => value is NonNullable<T>;
/**
 * Checks if the value `null` or `undefined`.
 *
 * @param value Value to check for `null` and `undefined`.
 * @returns Returns `true` if `value` is `null` or `undefined`, else `false`.
 */
export declare const isNullable: (value: unknown) => value is null | undefined;
/**
 * Creates a function that checks if the given `child`
 * is an instance of some component specified by `name`.
 *
 * @param name Component name for which function will be created.
 * @returns A function that checks if the given `child` is an instance of the component specified by `name`.
 */
export declare const isReactUIComponent: <P = any>(name: string) => (child: React.ReactNode) => child is React.ReactElement<P, string | React.JSXElementConstructor<any>>;
/**
 * Checks if a component instance is a ReactUI component with the given name.
 *
 * @typeParam T Expected ReactUI component type.
 * @param instance Component instance.
 * @param componentName ReactUI component name.
 * @returns `true` if it matches, otherwise `false`.
 */
export declare const isReactUIInstance: <T extends React.Component<{}, {}, any>>(instance: React.Component, componentName: string) => instance is T;
/** @deprecated Переехал в `lib/mergeRefs.ts`. Со следующей мажорной версии от сюда будет удален*/
export declare function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T>;
/**
 * Extracts all data attributes from props and returns them as well as props.
 *
 * @param props Props object to extract data attributes from.
 * @returns Separated data attributes and all other props.
 */
export declare const extractDataProps: <T extends Record<string, any>>(props: T) => {
    dataProps: Record<string, any>;
    restWithoutDataProps: Record<string, any>;
};
/**
 * Basically `.startsWith` for arrays.
 *
 * @param searchKeys Array of strings to test against `inputString`.
 * @param inputString String on which search will be performed.
 * @returns `true` if `inputString` starts with one of keys, else `false`.
 */
export declare const startsWithOneOf: (searchKeys: string[], inputString: string) => boolean;
export declare const isButton: (child: React.ReactNode) => child is React.ReactElement<ButtonProps<"button">, string | React.JSXElementConstructor<any>>;
export declare const isInput: (child: React.ReactNode) => child is React.ReactElement<InputProps, string | React.JSXElementConstructor<any>>;
export declare const isFxInput: (child: React.ReactNode) => child is React.ReactElement<FxInputProps, string | React.JSXElementConstructor<any>>;
export declare const isAutocomplete: (child: React.ReactNode) => child is React.ReactElement<AutocompleteProps, string | React.JSXElementConstructor<any>>;
export declare const isPasswordInput: (child: React.ReactNode) => child is React.ReactElement<PasswordInputProps, string | React.JSXElementConstructor<any>>;
export declare const isCurrencyInput: (child: React.ReactNode) => child is React.ReactElement<CurrencyInputProps, string | React.JSXElementConstructor<any>>;
export declare const isSelect: (child: React.ReactNode) => child is React.ReactElement<SelectProps<unknown, unknown>, string | React.JSXElementConstructor<any>>;
export declare const isDropdown: (child: React.ReactNode) => child is React.ReactElement<DropdownProps, string | React.JSXElementConstructor<any>>;
export declare const isDropdownMenu: (child: React.ReactNode) => child is React.ReactElement<DropdownMenuProps, string | React.JSXElementConstructor<any>>;
export declare const isHint: (child: React.ReactNode) => child is React.ReactElement<HintProps, string | React.JSXElementConstructor<any>>;
export declare const isTooltip: (child: React.ReactNode) => child is React.ReactElement<TooltipProps, string | React.JSXElementConstructor<any>>;
export declare const isKonturIcon: (icon: React.ReactElement) => boolean;
export declare function clickOutside(eventType?: 'touchstart' | 'mousedown' | 'pointerup'): void;
export declare function isElement(el: unknown): el is Element;
export declare function isDocument(node?: Document | null): node is Document;
export declare function isWindow(node?: Window | null): node is Window;
export declare function tryGetDocument(node?: Node | null): Document | null;
export declare function tryGetWindow(node?: Node | null): Window | null;
