import type { StyleProp, ViewStyle } from "react-native" // Event payloads export type OnLoadEventPayload = { url: string } export type ChangeEventPayload = { value: string } // ExpoBle view props export type ExpoBleViewProps = { url: string onLoad: (event: { nativeEvent: OnLoadEventPayload }) => void style?: StyleProp } // BLE Store types export type DeviceRole = "scanner" | "printer" | "other" | "handheld" export type CharacteristicData = { uuid: string serviceUUID: string value?: string rawBase64?: string decoded?: string } export type BleDevice = { id: string name?: string | null connected: boolean role: DeviceRole rssi?: number | null serviceUUIDs?: string[] | null characteristics: Record manuallyDisconnected?: boolean rfidReady?: boolean barcodeReady?: boolean } export interface ExtendedSubscription { remove?: () => void transactionId?: number } export type BleState = { devices: Record connectedDevices: Record showNamedOnly: boolean trigger: boolean subscriptions: ExtendedSubscription[] setShowNamedOnly: (value: boolean) => void setTrigger: (value: boolean) => void setSubscriptions: (subscriptions: ExtendedSubscription[]) => void addDevice: (device: Partial & { id: string }) => void addConnectedDevice: (device: BleDevice) => void removeConnectedDevice: (id: string) => void removeDevice: (id: string) => void updateDevice: (id: string, patch: Partial) => void updateConnectedDevice: (id: string, patch: Partial) => void clear: () => void resetConnections: () => void } // useBle hook options export type UseBleOptions = { autoScan?: boolean } // Handheld data types export type HandheldBarcodeData = { message: string messagetype: string se4500_byte: string } export type HandheldRFIDData = { epc: string rssi: string tid: string } export type HandheldTriggerData = { keyAction: string keyRepeatCount: string keyTime: string } // CSL/CS108 constants (enums as string literal types) export type CslHeaderType = "RFID" | "BARCODE" | "NOTIFICATION" export type CslCommandType = | "START_RFID_READER" | "STOP_RFID_READER" | "SET_RFID_READER" | "ABORT" | "START_BARCODE_READER" | "STOP_BARCODE_READER" | "TRIGGER_BARCODE_SCAN" | "SET_BARCODE_READER" | "START_BARCODE_VIBRATION" | "STOP_BARCODE_VIBRATION" export type BleProviderConfig = { autoScan?: boolean showNamedOnly?: boolean } // ExpoBle module events export type ExpoBleModuleEvents = { onChange: (params: ChangeEventPayload) => void }