import { NativeModules } from 'react-native'

export type EpcReply = {
  device: string
  rssi: number
  epc: string
  pc: string
}

export type RfidReader = {
  name: string
  address: string
}

export interface IRfidBleNative {
  requestEnabled(): Promise<void>
  startScan(): Promise<void>
  stopScan(): Promise<void>
  connectToReader(readerAddress: string): Promise<void>
  disconnect(): Promise<void>
}

export const RfidBleNative: IRfidBleNative = NativeModules.RfidBle
