import {
    NativeModules,
    HostComponent,
    requireNativeComponent,
    Platform,
    StyleProp,
    ViewStyle,
  } from 'react-native'

  export interface NativeLayoutUnit {
    kind: "mrz" | "qrcode"
  }
  
  export interface NativeViewProps {
    style?: StyleProp<ViewStyle>
    layout: NativeLayoutUnit[]
  }

  export const RNVntelCCCDMRZView = (
    requireNativeComponent('RNVntelCCCDMRZView')
  ) as HostComponent<NativeViewProps> | null
  
  export const RNVntelCCCD = NativeModules.RNVntelCCCD
  if (!RNVntelCCCD) console.error('[react-native-vntel-cccd] RNVntelCCCD native module is not linked.')