import { IListProps, IPage } from './List.types';
import BaseComponent from '../BaseComponent';
import { IRectangle } from '@uifabric-vue/utilities';
import { CreateElement } from 'vue';
export interface IListState<T = any> {
    pages?: IPage<T>[];
    /** The last versionstamp for  */
    measureVersion?: number;
    isScrolling?: boolean;
}
/**
 * The List renders virtualized pages of items. Each page's item count is determined by the getItemCountForPage callback if
 * provided by the caller, or 10 as default. Each page's height is determined by the getPageHeight callback if provided by
 * the caller, or by cached measurements if available, or by a running average, or a default fallback.
 *
 * The algorithm for rendering pages works like this:
 *
 * 1. Predict visible pages based on "current measure data" (page heights, surface position, visible window)
 * 2. If changes are necessary, apply changes (add/remove pages)
 * 3. For pages that are added, measure the page heights if we need to using getBoundingClientRect
 * 4. If measurements don't match predictions, update measure data and goto step 1 asynchronously
 *
 * Measuring too frequently can pull performance down significantly. To compensate, we cache measured values so that
 * we can avoid re-measuring during operations that should not alter heights, like scrolling.
 *
 * To optimize glass rendering performance, onShouldVirtualize can be set. When onShouldVirtualize return false,
 * List will run in fast mode (not virtualized) to render all items without any measurements to improve page load time. And we
 * start doing measurements and rendering in virtualized mode when items grows larger than this threshold.
 *
 * However, certain operations can make measure data stale. For example, resizing the list, or passing in new props,
 * or forcing an update change cause pages to shrink/grow. When these operations occur, we increment a measureVersion
 * number, which we associate with cached measurements and use to determine if a remeasure should occur.
 */
export declare class List extends BaseComponent<IListProps> {
    $refs: {
        root: HTMLDivElement;
        surface: HTMLDivElement;
    };
    items: any;
    getItemCountForPage: (...args: any[]) => number;
    getPageHeight: (...args: any[]) => number;
    renderedWindowsAhead: number;
    renderedWindowsBehind: number;
    startIndex: number;
    ignoreScrollingState: boolean;
    pages: IPage<any>[];
    isScrolling: boolean;
    measureVersion: number;
    surfaceRect: IRectangle | undefined;
    requiredRect: IRectangle | null;
    allowedRect: IRectangle;
    visibleRect: IRectangle | undefined;
    materializedRect: IRectangle | null;
    scrollHeight: number;
    scrollTop: number;
    requiredWindowsAhead: number;
    requiredWindowsBehind: number;
    role: string;
    scrollElement: HTMLElement;
    focusedIndex: number;
    totalEstimates: number;
    hasCompletedFirstRender: boolean;
    pageCache: any;
    cachedPageHeights: {
        [key: string]: {
            height: number;
            measureVersion: number;
        };
    };
    estimatedPageHeight: number;
    render(h: CreateElement): import("vue").VNode;
    created(): void;
    itemsChanged(newVal: any, oldVal: any): void;
    shouldUpdate(newVal: boolean, oldVal: boolean): void;
    mounted(): void;
    /**
     * Debounced method to asynchronously update the visible region on a scroll event.
     */
    private _onAsyncScroll;
    /**
     * This is an async debounced method that will try and increment the windows we render. If we can increment
     * either, we increase the amount we render and re-evaluate.
     */
    private _onAsyncIdle;
    /** Track the last item index focused so that we ensure we keep it rendered. */
    private _onFocus;
    /**
     * Called synchronously to reset the required render range to 0 on scrolling. After async scroll has executed,
     * we will call onAsyncIdle which will reset it back to it's correct value.
     */
    private _onScroll;
    private resetRequiredWindows;
    /**
     * Function to call when the list is done scrolling.
     * This function is debounced.
     */
    private _onScrollingDone;
    /** Generate the style object for the page. */
    private getPageStyle;
    private _buildPages;
    private _getPageSpecification;
    /**
     * Get the pixel height of a give page. Will use the props getPageHeight first, and if not provided, fallback to
     * cached height, or estimated page height, or default page height.
     */
    private _getPageHeight;
    private _getItemCountForPage;
    /** Called when a page has been added to the DOM. */
    private _onPageAdded;
    /** Called when a page has been removed from the DOM. */
    private _onPageRemoved;
    /**
     * Notify consumers that the rendered pages have changed
     * @param oldPages - The old pages
     * @param newPages - The new pages
     * @param props - The props to use
     */
    private notifyPageChanges;
    private updatePages;
    private updatePageMeasurements;
    /**
     * Given a page, measure its dimensions, update cache.
     * @returns True if the height has changed.
     */
    private measurePage;
    private _createPage;
    private _getRenderCount;
    private shouldVirtualize;
    /** Calculate the visible rect within the list where top: 0 and left: 0 is the top/left of the list. */
    private updateRenderRects;
}
//# sourceMappingURL=List.d.ts.map