/**
 * Copyright (c) 2026-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { type TDSResultCellData } from '@finos/legend-graph';
export interface ValueFrequency {
    /** String representation of the value, or '(other)' / '(empty)' for synthetic buckets */
    label: string;
    count: number;
    /** True for the synthetic '(other)' bucket */
    isOther?: boolean;
    /** True for the synthetic '(empty)' bucket */
    isEmpty?: boolean;
}
export interface DistributionBucket {
    /** Lower bound of the bucket (inclusive) */
    lower: number;
    /** Upper bound of the bucket (exclusive, except the last which is inclusive) */
    upper: number;
    /** Number of values that fall in this bucket */
    count: number;
    /** For date columns: human-readable label for lower bound */
    lowerDateLabel?: string;
    /** For date columns: human-readable label for upper bound */
    upperDateLabel?: string;
}
/** Discriminates how the chart tooltip should describe bucket bounds */
export type DistributionChartType = 'numeric' | 'string-length' | 'date';
export interface CellSelectionStats {
    count: number;
    uniqueCount: number;
    nullCount: number;
    min: number | undefined;
    max: number | undefined;
    sum: number | undefined;
    avg: number | undefined;
    dateMin: string | undefined;
    dateMax: string | undefined;
    strMinLength: number | undefined;
    strMaxLength: number | undefined;
    /** Frequency distribution histogram buckets.
     *  Computed for numeric, string (length), and date columns.
     *  undefined for other types. */
    distributionBuckets: DistributionBucket[] | undefined;
    /** Describes what the bucket bounds represent, for tooltip formatting */
    distributionChartType: DistributionChartType | undefined;
    /** Top-10 value frequencies for the Unique Count tooltip, plus optional (other) */
    valueFrequencies: ValueFrequency[] | undefined;
}
/**
 * Compute summary statistics for a cell selection.
 * ...existing code...
 */
export declare const computeCellSelectionStats: (selectedCells: TDSResultCellData[], columnTypes: Map<string, string | undefined>) => CellSelectionStats | undefined;
//# sourceMappingURL=QueryBuilderTDSCellSelectionStats.d.ts.map