/**
 * Copyright (c) OpenLens Maintainers. All rights reserved.
 * Licensed under MIT License. See LICENSE in root directory for more information.
 */
import "./table.scss";
import React from "react";
import type { StrictReactNode } from "@openlens/utilities";
import type { TableRowProps } from "./table-row";
export type TableSortBy = string;
export type TableOrderBy = "asc" | "desc";
export interface TableSortParams {
    sortBy: TableSortBy;
    orderBy: TableOrderBy;
}
export type TableSortCallback<Item> = (data: Item) => undefined | string | number | (string | number)[];
export type TableSortCallbacks<Item> = Record<string, TableSortCallback<Item>>;
export interface TableProps<Item> extends React.DOMAttributes<HTMLDivElement> {
    /**
     * Used for persisting sort order and visible columns
     */
    tableId?: string;
    /**
     * The raw data for the table
     */
    items?: Item[];
    /**
     * Optional addition class names for the root HTML element
     */
    className?: string;
    /**
     * Setup auto-sizing for all columns (flex: 1 0)
     */
    autoSize?: boolean;
    /**
     * Highlight rows on hover
     */
    selectable?: boolean;
    /**
     * Use scrollbar if content is bigger than parent's height
     */
    scrollable?: boolean;
    /**
     * @deprecated Unused
     */
    storageKey?: string;
    /**
     * Define sortable callbacks for every column in `<TableHead><TableCell sortBy="someCol"></TableCell></TableHead>`
     * @sortItem argument in the callback is an object, provided in `<TableRow sortItem={someColDataItem}></TableRow>`
     */
    sortable?: TableSortCallbacks<Item>;
    /**
     * sorting state is managed globally from url params
     */
    sortSyncWithUrl?: boolean;
    /**
     * default sorting params
     */
    sortByDefault?: Partial<TableSortParams>;
    /**
     * callback on sort change
     *
     * Default: global sync with url
     */
    onSort?: (params: TableSortParams) => void;
    /**
     * This is shown when {@link TableProps.items} is empty
     */
    noItems?: StrictReactNode;
    /**
     * Allows to scroll list to selected item
     */
    selectedItemId?: string;
    /**
     * Use virtual list component to render only visible rows. By default uses a
     * auto sizer to fill available height
     */
    virtual?: boolean;
    /**
     * Only used when virtual is true. Sets the virtual list to be a fixed height.
     * Needed when used in contexts that already have a parent component that
     * is `overflow-y: scroll`,
     */
    virtualHeight?: number;
    /**
     * Row padding in pixels
     */
    rowPadding?: number;
    /**
     * Row line height in pixels
     */
    rowLineHeight?: number;
    customRowHeights?: (item: Item, lineHeight: number, paddings: number) => number;
    getTableRow?: (uid: string) => React.ReactElement<TableRowProps<Item>> | undefined | null;
    renderRow?: (item: Item) => React.ReactElement<TableRowProps<Item>> | undefined | null;
}
export declare const Table: <Item>(props: TableProps<Item>) => React.ReactElement;
