import React from 'react'; import { FlatIndexLocationWithAlign, ListItem } from '../react-virtuoso'; declare type UseHighlightScrollParams = { /** function to call to scroll to target index */ scrollToIndex: (location: FlatIndexLocationWithAlign) => void; /** that scroll container height ref */ containerHeighRef: React.MutableRefObject; }; /** * scroll into current highlight index */ export declare function useHighlightScroll({ containerHeighRef, scrollToIndex, }: UseHighlightScrollParams): { /** * scroller reference */ scrollerRef: React.MutableRefObject; /** * Scroll to target highlighted index * @param prevHighlightedIndex previous highlightedIndex * @param currHighlightedIndex current highlightedIndex * @param topHighlightIndex top highlighIndex for check should scroll when init */ scrollToHighlightedIndex: (prevHighlightedIndex: number, currHighlightedIndex: number, topHighlightIndex?: number) => void; /** * set to virtuoso `scrollerRef` prop, auto bind inner `scrollerRef` */ scrollerRefFn: (elm: HTMLElement) => HTMLElement; /** * set to virtuoso `itemsRendered` prop, auto bind inner `renderedItemsRef` */ itemsRendered: (e: ListItem[]) => ListItem[]; }; /** * modify virtuoso style to fix safari scroll bug */ export declare function modifyVlScrollerStyle(scrollElm: HTMLElement, position?: 'absolute' | 'unset'): void; export {};