import type { FitAreaInfo } from "../types"; import type { MeasurementLines } from "../pose-detect"; export type GranularFit = "good" | "tight" | "loose" | "a-bit-tight" | "a-bit-loose" | "too-tight" | "too-loose"; /** Compute granular fit label for a single measurement. Mirrors the * backend deterministic engine's edge-based thresholds so the FIT * DIRECTIVES the SDK ships to /tryon match what the user reads in the * table: * - "good" : in chart range OR within ½" / 1.27 cm of nearest edge * - "a-bit-X" : ½"–1" past the edge * - "X" : 1"–2" past the edge * - "too-X" : > 2" past the edge * Where X is tight (over upper edge) or loose (under lower edge). */ export declare function computeFit(userValue: number, chartRange: string, unit?: "in" | "cm" | "mm"): GranularFit; /** * Build FitAreaInfo[] from matchDetails + optional pose coordinates. * This is what gets sent to the backend so Gemini knows how to render each body region. */ export declare function buildFitInfo(matchDetails: Array<{ measurement: string; userValue: string; chartRange: string; fit: string; section?: string; }>, poseLines?: MeasurementLines | null, unit?: "in" | "cm" | "mm"): FitAreaInfo[]; /** * Build silhouette-prompt context forwarded to the backend try-on Gemini * call. Returns only the selected fit context Gemini needs: user raw * measurements, recommended size, and the chosen size's measurement row. * The full product size guide is intentionally not forwarded to try-on. * * All fields optional — returns `undefined` when there's nothing useful * to add (e.g. accessory flow, no sizingResult). */ export declare function buildSilhouetteContext(sizingResult: { recommendedSize?: string; recommendedLength?: string | null; unit?: string; matchDetails?: Array<{ measurement: string; userValue: string; chartRange: string; }>; /** Backend-formatted matched row text, e.g. "Chest (in) 40, Chest (cm) 102". Single-section. */ matchedRowText?: string; sections?: Record; /** Backend-formatted matched row text for this section. */ matchedRowText?: string; }>; } | null | undefined, sizeGuide: { headers?: string[]; rows?: string[][]; sections?: Record; } | null | undefined, /** Optional override — when the user manually picks a different size in * the result view and hits "Apply this size", we want Gemini to reason * about THAT size, not the original recommendation. */ selectedSizeOverride?: string, /** Active profile's height/weight, formatted for prompt display (e.g. * `"5'6\""` and `"185 lbs"`). Passed straight to the backend so the * prime directive can include the model's frame. */ userHeight?: string, userWeight?: string): { recommendedSize?: string; recommendedSizeMeasurements?: string; userMeasurementsText?: string; userHeight?: string; userWeight?: string; } | undefined;