import type { EyeStatusResult, UseBlinkDetectionResult } from '../types'; /** * Options for useBlinkDetection hook */ export interface UseBlinkDetectionOptions { /** Whether eye tracking is enabled. Default: true */ enabled?: boolean; /** Threshold below which an eye is considered closed (0-1). Default: 0.5 */ eyeClosedThreshold?: number; /** Callback when eye status changes */ onEyeStatusChange?: (status: EyeStatusResult) => void; } /** * Hook for tracking eye status from detected faces * * This hook provides real-time eye open/closed status based on face detection results. * The user can set their own threshold for determining when an eye is considered closed. * * @param options - Eye tracking options * @returns Eye status and controls * * @example * ```tsx * function EyeTracker() { * const { eyeStatus, processEyeStatus } = useBlinkDetection({ * eyeClosedThreshold: 0.3, // Consider eye closed when probability < 0.3 * onEyeStatusChange: (status) => { * // Handle blink detection yourself based on status * if (status.leftEye.isClosed && status.rightEye.isClosed) { * console.log('Both eyes closed!'); * } * }, * }); * * // In your face detection callback: * const handleFaces = (faces: Face[]) => { * processEyeStatus(faces); * }; * * return ( * * Left Eye: {eyeStatus?.leftEye.openProbability.toFixed(2)} * Right Eye: {eyeStatus?.rightEye.openProbability.toFixed(2)} * * ); * } * ``` */ export declare function useBlinkDetection(options?: UseBlinkDetectionOptions): UseBlinkDetectionResult; //# sourceMappingURL=useBlinkDetection.d.ts.map