import { default as React } from 'react'; import { VoidFunction } from '@viasat/beam-shared/utils/constants'; import { debounce } from '@viasat/beam-shared/utils/helpers'; export { useId } from './useId'; export { usePrevious } from './usePrevious'; export { useInteractiveProps, type UseInteractivePropsOptions, type InteractiveProps, type InteractiveElementType, } from './useInteractiveProps'; type WaitFor = Parameters[1]; /** * Hook to set up a resize observer on an element. * * @param resizeCallBack the callback to call when the element resizes * @param waitFor the time to wait before calling the callback * @param deps the dependencies to watch for changes * * @returns ref to attach to the element */ export declare const useResizeObserver: (resizeCallBack: VoidFunction, waitFor?: WaitFor, deps?: React.DependencyList) => { ref: React.MutableRefObject; }; /** * Hook to check if an element is overflowing, when there is a height * or width set to the element. * * @returns */ export declare const useIsOverFlowing: () => { ref: React.MutableRefObject; isOverFlowing: boolean; }; /** * Hook to check if an elements text wraps when there is no * height or width set on the element. This hook will create a clone of * the element, so there is a performance cost to using this hook. * * @param node the element to check if it is overflowing * @returns */ export declare const useIsTextWrapping: (node: React.ReactNode) => { ref: React.MutableRefObject; isTextWrapping: boolean; }; /** * Takes in a CSS var evaluation (ideally from Beam token consts file) and * looks for the declaration on the document root. The return value will be * updated when the CSS var is updated or found if it wasn't initially on the * document root. * * @param cssVar the CSS variable to look up * * @returns raw string value of the CSS variable */ export declare const useCSSLookup: (cssVar: string) => string; /** * Returns true when the element itself, any ancestor, or * has RTL direction — updates live on attribute or CSS changes. */ export declare function useRTLDirection(ref: React.RefObject): boolean; export declare const useMobileDetection: () => boolean;