export interface CompressOptions {
    /** Longest side, in pixels. Default 512. Raise for close-up photos
     *  (face / head) where the product's detail IS on the face — 1536 gives
     *  the try-on model enough pixels to render sharp frame edges. */
    maxDimension?: number;
    /** JPEG quality, 0–1. Default 0.65. Raise to 0.85+ for close-ups so the
     *  face region isn't macroblocked before Gemini renders the frame. */
    quality?: number;
}
/** Compresses and resizes an image file, returns a base64 data URL. */
export declare function compressImage(file: File, opts?: CompressOptions): Promise<string>;
/** Validates that a file is an accepted image type. AVIF is accepted for
 *  upload — Gemini's API doesn't support AVIF directly, but compressImage
 *  re-encodes the canvas as JPEG before we ship it, so AVIF inputs land as
 *  JPEG on the wire. */
export declare function isValidImageFile(file: File): boolean;
/**
 * Pre-upload age check. Sends the photo to the backend's
 * /api/v1/sizing/age-check endpoint. Backend uses Gemini Flash-Lite to
 * classify whether the subject is 18+. The bytes are NOT persisted by the
 * backend (no disk write, no logging of full base64).
 *
 * Accepts EITHER a File OR a base64 data URL. When a File is provided we
 * compress it to a tight 384px / 60% JPEG thumb on the way out — Gemini
 * Flash-Lite only needs facial maturity, not pixel detail, and a smaller
 * payload trims a noticeable chunk of network + decode latency end-to-end.
 *
 * Fail-open: if the network call errors or the backend is unreachable, we
 * return isAdult=true so a network hiccup doesn't block legitimate users.
 * The existing self-cert checkbox is the defense-in-depth fallback.
 */
export declare function checkAgeBeforeUpload(imageOrBase64: string | File, apiUrl: string, apiKey: string): Promise<{
    isAdult: boolean;
    confidence: "high" | "low";
    reasoning?: string;
    detectedGender?: "male" | "female" | "unknown";
}>;
