import { type BoxplotItem } from '../../stats/boxplot.js';
import type { TestDef } from '../../renderer/buildWaferMap.js';
import { type SaveImageHandler } from './chartShell.js';
/** A `BoxplotItem` carrying enough identity for the panel to open its wafer
 *  on a leaf-row click — the tab's own item shape already has this. */
export type BoxplotPanelItem = BoxplotItem & {
    waferIndex?: number;
};
export interface BoxplotPanelOptions {
    title?: string;
    items: BoxplotPanelItem[];
    testDefs: TestDef[];
    selectedTestNumber?: number;
    colorScheme?: string;
    onSaveImage?: SaveImageHandler;
    /**
     * When the Analysis tab's "Group by" is active, this panel shows one
     * pooled row per group by default (all of that group's items' dies
     * combined into one five-number summary); clicking a group's row drills
     * in place into that group's own per-item rows, with a Back button.
     * `items` above is ignored when `groups` is provided. Absent ⇒ today's
     * plain ungrouped per-item rows, no drill.
     */
    groups?: {
        key: string;
        items: BoxplotPanelItem[];
    }[];
    /** Human label of the active facet (e.g. "Split"), used in the overview
     *  hint text ("click a <label>'s box to see it by wafer"). */
    groupLabelText?: string;
    /** Clicking a leaf row (a real per-item row — ungrouped, or drilled into
     *  a group) calls this with that item's `waferIndex` and the boxplot's
     *  currently selected `testNumber`, so the opened wafer can land on the
     *  same test in value mode instead of defaulting to hard-bin mode.
     *  Never called for a pooled group-overview row (that drills instead). */
    onOpen?: (waferIndex: number, testNumber: number) => void;
}
export interface BoxplotPanelHandle {
    card: HTMLElement;
    /** Cross-panel link (e.g. from the capability panel): switch to `testNumber` in place. */
    setTest: (testNumber: number) => void;
    destroy: () => void;
}
export declare function renderBoxplotPanel(options: BoxplotPanelOptions): BoxplotPanelHandle;
//# sourceMappingURL=boxplot.d.ts.map