import type { Die } from '../core/dies.js';
import type { ChartDatum } from './yield.js';
export type BinType = 'hbin' | 'sbin';
export interface BinItem {
    dies?: Die[];
    /**
     * Precomputed bin counts for this item (e.g. `StatsSummary.stats.hardBinCounts`/
     * `.softBinCounts`, already scoped to the same yield-eligible population).
     * When supplied, used directly instead of re-walking `dies` — avoids
     * re-deriving the same counts `analyzeWaferMap` already computed.
     */
    hardBinCounts?: Record<number, number>;
    softBinCounts?: Record<number, number>;
}
/**
 * One bar per bin, across all `items`, sorted by count descending. Excludes
 * partial/edge-excluded dies via `isYieldEligibleDie` — the same population
 * the adjacent Yield panel uses — so the two panels' totals reconcile for
 * the same wafer/group. Items carrying precomputed `hardBinCounts`/
 * `softBinCounts` (see `BinItem`) contribute those directly, skipping the
 * per-die walk for that item.
 */
export declare function buildBinParetoData(items: BinItem[], binType: BinType): ChartDatum[];
/** One bin's clustered bars: a count per group (aligned to `BinClusterData.groups`). */
export interface BinCluster {
    binCode: number;
    label: string;
    /** Total dies of this bin across all groups — drives pareto ordering. */
    total: number;
    /** Per-group die counts for this bin, aligned to `BinClusterData.groups`. */
    counts: number[];
}
/** Clustered bin pareto: the group list (legend order) plus one cluster per bin. */
export interface BinClusterData {
    groups: string[];
    bins: BinCluster[];
}
/**
 * Clustered bin pareto: every group's bin counts side by side, so groups
 * compare directly bin-by-bin. Unlike the plain pareto, this is never a
 * restrict-to-one-group view — all groups are always shown at once,
 * matching tsmap's actual behavior (a wholly different panel swapped in for
 * bin pareto when grouping is active, not a variant of it).
 */
export declare function buildBinClusterData(groups: {
    key: string;
    items: BinItem[];
}[], binType: BinType): BinClusterData;
//# sourceMappingURL=binPareto.d.ts.map