// @ts-nocheck
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps } from 'react-native';
import type {
  BubblingEventHandler,
  Int32,
} from 'react-native/Libraries/Types/CodegenTypes';

type Event = Readonly<{
  value: string;
}>;

interface BarCodeFormat {
  acceptedFormats: ReadonlyArray<string>;
}

export interface NativeProps extends ViewProps {
  autoFocusEnabled: boolean;
  flashModeEnabled: boolean;
  acceptFormats?: Readonly<BarCodeFormat>;
  onScanResultListener?: BubblingEventHandler<Event>;
  frameWidth?: Int32;
  frameHeight?: Int32;
  frameBorderColor?: string;
}

export default codegenNativeComponent<NativeProps>('BarcodeScannerView');
