export type LivenessStep = "idle" | "requesting_camera" | "camera_ready" | "no_face" | "centralize" | "approach" | "away" | "still" | "ready" | "capturing" | "success" | "error";
export interface BiometriaEmbedModules {
    provaDeVida: boolean;
    ageEstimation?: boolean;
    facialBiometrics?: boolean;
}
export interface BiometriaEmbedTheme {
    backgroundColor?: string;
    surfaceColor?: string;
    cardColor?: string;
    primaryColor?: string;
    secondaryColor?: string;
    textPrimaryColor?: string;
    textSecondaryColor?: string;
    borderColor?: string;
    outlineColor?: string;
    helperBackgroundColor?: string;
    helperTextColor?: string;
    selectionAccentColor?: string;
}
export interface BiometriaEmbedBranding {
    logoUrl?: string;
    logoAlt?: string;
}
export type BiometriaModuleKey = "selection" | "provaDeVida" | "ageEstimation" | "facialBiometrics";
export interface AgeEstimationResult {
    success: boolean;
    estimatedAge?: number;
    estimatedAgeMin?: number;
    estimatedAgeMax?: number;
    confidence?: number;
    message: string;
    sessionId?: string;
    module?: "age_estimation";
}
export interface BiometriaEmbedCallbacks {
    onSuccess?: (result: LivenessResult) => void;
    onAgeEstimated?: (result: AgeEstimationResult) => void;
    onError?: (error: BiometriaEmbedError) => void;
    onStepChange?: (step: LivenessStep) => void;
}
export interface BiometriaEmbedConfig {
    container: string | HTMLElement;
    sessionId: string;
    apiBaseUrl: string;
    modules: BiometriaEmbedModules;
    entryMode?: "auto" | "selection";
    theme?: BiometriaEmbedTheme;
    branding?: BiometriaEmbedBranding;
    debug?: boolean;
    callbacks?: BiometriaEmbedCallbacks;
}
export interface LivenessMetadata {
    movementDetected: boolean;
    cameraActive: boolean;
    framesCaptured: number;
}
export interface LivenessFrameAnalysisRequest {
    imageBase64: string;
    sessionId?: string;
}
export interface LivenessFrameAnalysisMetrics {
    frameWidth: number;
    frameHeight: number;
    faceX: number;
    faceY: number;
    faceWidth: number;
    faceHeight: number;
    faceCenterX: number;
    faceCenterY: number;
    frameCenterX: number;
    frameCenterY: number;
    faceWidthRatio: number;
    faceHeightRatio: number;
    centerOffsetX: number;
    centerOffsetY: number;
}
export interface LivenessFrameAnalysisChecks {
    faceDetected: boolean;
    centered: boolean;
    distanceOk: boolean;
    tooClose: boolean;
    tooFar: boolean;
}
export interface LivenessFrameAnalysisResult {
    success: boolean;
    module: "liveness";
    status: "valid" | "invalid";
    instruction: string;
    canCapture: boolean;
    checks: LivenessFrameAnalysisChecks;
    metrics: LivenessFrameAnalysisMetrics;
    reason?: string;
    sessionId?: string;
}
export interface LivenessCapturePreviewQuality {
    faceVisible: boolean;
    sharpEnough: boolean;
    wellLit: boolean;
    contrastOk: boolean;
    blurScore: number;
    brightness: number;
    contrast: number;
    faceAreaRatio: number;
    accessoryWarnings: string[];
    warnings: string[];
    qualityScore: number;
}
export interface LivenessCapturePreviewResult {
    success: boolean;
    module: "liveness";
    status: "ready" | "warning" | "invalid";
    canProceed: boolean;
    warnings: string[];
    recommendations: string[];
    quality: LivenessCapturePreviewQuality;
    sessionId?: string;
}
export interface LivenessResult {
    success: boolean;
    module: "liveness";
    status: "approved" | "rejected";
    reason: string;
    metadata: Record<string, unknown>;
    sessionId?: string;
    score?: number;
    checks?: {
        cameraActive: boolean;
        movementDetected: boolean;
        framesCaptured: boolean;
        imageReceived: boolean;
    };
}
export interface BiometriaEmbedError {
    message: string;
    code?: string;
    details?: unknown;
}
export interface BiometriaEmbedInstance {
    destroy(): void;
    getSessionId(): string;
}
