/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import "./virtual-list.scss";
import type { ForwardedRef } from "react";
import React from "react";
import type { Align, ListChildComponentProps, ListOnScrollProps } from "react-window";
import type { TableRowProps } from "../table/table-row";
export interface VirtualListProps<T extends {
    getId(): string;
} | string> {
    items: T[];
    rowHeights: number[];
    className?: string;
    width?: number | string;
    initialOffset?: number;
    readyOffset?: number;
    selectedItemId?: string;
    getRow?: (uid: T extends string ? number : string) => React.ReactElement | undefined | null;
    onScroll?: (props: ListOnScrollProps) => void;
    outerRef?: React.Ref<HTMLDivElement>;
    /**
     * If specified then AutoSizer will not be used and instead a fixed height
     * virtual list will be rendered
     */
    fixedHeight?: number;
}
export interface VirtualListRef {
    scrollToItem: (index: number, align: Align) => void;
}
export declare const VirtualList: <T extends string | {
    getId(): string;
}>(props: VirtualListProps<T> & {
    ref?: ForwardedRef<VirtualListRef> | undefined;
}) => JSX.Element;
interface RowData<T extends {
    getId(): string;
} | string> {
    items: T[];
    getRow?: (uid: T extends string ? number : string) => React.ReactElement<TableRowProps<T>>;
}
export interface RowProps<T extends {
    getId(): string;
} | string> extends ListChildComponentProps {
    data: RowData<T>;
}
export {};
