import type { WaferWarning, WaferMapResult } from '../renderer/buildWaferMap.js';
import type { StatsSummary, LotStatsSummary } from '../stats/types.js';
export type { WaferWarning };
/**
 * Controls the built-in warning UI.
 *
 * Hosts that already have their own notification system should set
 * `display: false` and read the warnings from `onWarning` — that way the library
 * still does the collecting, de-duplicating and severity ordering, and the host
 * only owns presentation. Turning the UI off without wiring `onWarning` means
 * nobody is told, which is the situation this feature exists to end.
 */
export interface WarningsOptions {
    /**
     * Show the built-in warning indicator in the toolbar and the banner in the
     * Summary panel. Default `true`.
     */
    display?: boolean;
    /**
     * Called with the collected, de-duplicated, severity-ordered warnings whenever
     * they change (including once on mount, with an empty array when there are
     * none, so a host can clear its own display).
     */
    onWarning?: (warnings: WaferWarning[]) => void;
}
/** Severity with the documented default applied. */
export declare function severityOf(w: WaferWarning): NonNullable<WaferWarning['severity']>;
/**
 * Gather every advisory relevant to one rendered map, most serious first.
 *
 * De-duplicated on `code` + `message`: a lot gallery legitimately produces the
 * same geometry advisory on many wafers, and repeating it once per wafer would
 * bury the one that differs.
 */
export declare function collectWarnings(sources: {
    /** `warnings` is optional, not merely the object: a gallery card is a
     *  `WaferMapDisplayItem`, which carries the field only when it was spread
     *  from a `WaferMapResult`. The body already tolerates its absence — the
     *  type used to require it, which is why callers reached this through a
     *  cast. */
    result?: Partial<Pick<WaferMapResult, 'warnings'>> | null;
    statsSummary?: StatsSummary | null;
    lotStatsSummary?: LotStatsSummary | null;
}): WaferWarning[];
/**
 * The Summary panel banner. One block per severity present, so an "dies may be
 * mis-positioned" error is never visually flattened into an advisory.
 */
export declare function buildWarningsBanner(warnings: WaferWarning[]): HTMLDivElement;
/**
 * The popup opened by the toolbar's warning indicator.
 *
 * Anchored like the toolbar's other menus (see `buildCheckMenuEl`) and flips to
 * right-aligned near the viewport edge.
 */
export declare function buildWarningsMenuEl(anchorRect: DOMRect, warnings: WaferWarning[], ownerWindow?: Window): HTMLDivElement;
//# sourceMappingURL=warnings.d.ts.map