import { RefObject, CSSProperties } from 'react';
import { DataGridHandle, DataGridProps, SortColumn } from 'react-data-grid';
import { Field } from '@grafana/data';
import { TableColumnResizeActionCallback } from '../types';
import { FilterType, TableRow, TableSortByFieldState, TableSummaryRow, TypographyCtx } from './types';
export interface FilteredRowsResult {
    rows: TableRow[];
    filter: FilterType;
    setFilter: React.Dispatch<React.SetStateAction<FilterType>>;
    crossFilterOrder: string[];
    crossFilterRows: Record<string, TableRow[]>;
}
export interface FilteredRowsOptions {
    hasNestedFrames: boolean;
}
export declare function useFilteredRows(rows: TableRow[], fields: Field[], { hasNestedFrames }: FilteredRowsOptions): FilteredRowsResult;
export interface SortedRowsOptions {
    hasNestedFrames: boolean;
    initialSortBy?: TableSortByFieldState[];
}
export interface SortedRowsResult {
    rows: TableRow[];
    sortColumns: SortColumn[];
    setSortColumns: React.Dispatch<React.SetStateAction<SortColumn[]>>;
}
export declare function useSortedRows(rows: TableRow[], fields: Field[], { initialSortBy, hasNestedFrames }: SortedRowsOptions): SortedRowsResult;
export interface PaginatedRowsOptions {
    height: number;
    width: number;
    rowHeight: NonNullable<CSSProperties['height']> | ((row: TableRow) => number);
    headerHeight: number;
    footerHeight: number;
    paginationHeight?: number;
    enabled: boolean;
}
export interface PaginatedRowsResult {
    rows: TableRow[];
    page: number;
    setPage: React.Dispatch<React.SetStateAction<number>>;
    numPages: number;
    rowsPerPage: number;
    pageRangeStart: number;
    pageRangeEnd: number;
    smallPagination: boolean;
}
export declare function usePaginatedRows(rows: TableRow[], { height, width, headerHeight, footerHeight, rowHeight, enabled }: PaginatedRowsOptions): PaginatedRowsResult;
interface UseHeaderHeightOptions {
    enabled: boolean;
    fields: Field[];
    columnWidths: number[];
    sortColumns: SortColumn[];
    typographyCtx: TypographyCtx;
    showTypeIcons?: boolean;
}
export declare function useHeaderHeight({ fields, enabled, columnWidths, sortColumns, typographyCtx, showTypeIcons, }: UseHeaderHeightOptions): number;
interface UseRowHeightOptions {
    columnWidths: number[];
    fields: Field[];
    hasNestedFrames: boolean;
    defaultHeight: NonNullable<CSSProperties['height']>;
    expandedRows: Set<number>;
    typographyCtx: TypographyCtx;
    maxHeight?: number;
}
export declare function useRowHeight({ columnWidths, fields, hasNestedFrames, defaultHeight, expandedRows, typographyCtx, maxHeight, }: UseRowHeightOptions): NonNullable<CSSProperties['height']> | ((row: TableRow) => number);
export declare function useColumnResize(onColumnResize?: TableColumnResizeActionCallback): DataGridProps<TableRow, TableSummaryRow>['onColumnResize'];
export declare function useScrollbarWidth(ref: RefObject<DataGridHandle>, height: number): number;
export declare function useColWidths(visibleFields: Field[], availableWidth: number, frozenColumns?: number): [number[], number];
export declare const useReducerEntries: (field: Field, rows: TableRow[], displayName: string, colIdx: number) => Array<[string, string | null]>;
export {};
