import { type ViewProps } from 'react-native'; import { CameraType, type FlashMode, type FocusMode, type ZoomMode, type TorchMode, type ResizeMode, type CodeFormat, } from './types'; import { Orientation } from './index'; export type OnReadCodeData = { nativeEvent: { codeStringValue: string; codeFormat: CodeFormat; }; }; export type OnOrientationChangeData = { nativeEvent: { orientation: typeof Orientation[keyof typeof Orientation]; }; }; export type OnZoom = { nativeEvent: { zoom: number; }; } export interface CameraProps extends ViewProps { // Behavior flashMode?: FlashMode; focusMode?: FocusMode; /** * Enable or disable the pinch gesture handler. * If `zoomMode` is `on`, you must pass `zoom` as `undefined`, or * avoid setting `zoom` it to allow pinch to zoom. * Examples: * ``` * * * * ``` */ zoomMode?: ZoomMode; /** * Controls zoom. Higher values zooms in. * Default zoom is `1.0`, relative to 'wide angle' camera. * Examples of minimum/widest zoom: * - iPhone 6S Plus minimum is `1.0` * - iPhone 14 Pro Max minimum `0.5` * - Google Pixel 7 minimum is `0.7` * ## Example * ``` * const [zoom, setZoom] = useState(1.0); *