import { type RefObject } from "react"; export type CameraStatus = "idle" | "unsupported" | "prompting" | "granted" | "denied" | "error"; export interface UseCameraReturn { videoRef: RefObject; stream: MediaStream | null; status: CameraStatus; error: string | null; isRecording: boolean; isPreparingRecording: boolean; imageBlob: Blob | null; imageUrl: string | null; recordedVideoBlob: Blob | null; recordedVideoUrl: string | null; requestCamera: () => Promise; stopCamera: () => void; captureImage: (type?: string, quality?: number) => Promise; startRecording: () => Promise; stopRecording: () => void; clearCapturedImage: () => void; clearRecordedVideo: () => void; } /** * A React hook for accessing and recording from the user's camera and microphone. * Supports taking picture snapshots and recording video with audio. * * @param {MediaStreamConstraints} constraints - The media constraints to apply when requesting the camera (e.g., `{ video: true }`). * @returns {UseCameraReturn} An object containing stream references, state flags, recorded blobs, and control functions. */ export declare function useCamera(constraints?: MediaStreamConstraints): UseCameraReturn; export default useCamera;