import type { DropoutProjectionRow } from "./dropoutProtocol.js";
export type DropoutProjectionWithKpi = DropoutProjectionRow & {
    countsTowardKpiRate: boolean;
};
export type DropoutProjectionApiSummary = {
    totalTrainees: number;
    /** Operational dropouts (TP reported or system-final). */
    effectiveDropouts: number;
    /** Dropouts counting toward KPI rate after over-enrollment buffer. */
    effectiveDropoutsForKpi: number;
    overEnrollmentBuffer: number;
    contractTargetTotal: number;
    registeredTraineesTotal: number;
    dropoutRatePctForKpi: number | null;
    systemRiskCount: number;
    systemFinalCount: number;
    /** System-final trainees the TP reported as N (attendance dispute) — pending M&E review. */
    disputedCount: number;
    missingInTpReport: number;
    reasonShares: Array<{
        reasonCode: string;
        count: number;
        sharePct: number;
    }>;
};
/** Mark which operational dropouts count toward contract-target KPI (buffer absorbs excess registered). */
export declare function enrichDropoutProjectionsWithKpiBuffer(rows: DropoutProjectionRow[], contractByTp: Map<string, number>, registeredByTp: Map<string, number>): DropoutProjectionWithKpi[];
export declare function buildDropoutProjectionApiSummary(rows: DropoutProjectionWithKpi[], contractByTp: Map<string, number>, registeredByTp: Map<string, number>, reasonShares: Array<{
    reasonCode: string;
    count: number;
    sharePct: number;
}>): DropoutProjectionApiSummary;
//# sourceMappingURL=dropoutKpiBuffer.d.ts.map