/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/react-native-star-printer@0.1.6/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
import{NativeModules,NativeEventEmitter,DeviceEventEmitter,Platform}from"react-native";const{RNReactNativeStarPrinter:RNReactNativeStarPrinter}=NativeModules,EventEmitter=Platform.select({ios:()=>new NativeEventEmitter(RNReactNativeStarPrinter),android:()=>DeviceEventEmitter})();if(console.log("RNReactNativeStarPrinter=>",RNReactNativeStarPrinter),!RNReactNativeStarPrinter)throw console.error("RNReactNativeStarPrinter is null."),new Error('NativeModule "RNReactNativeStarPrinter" is not link yet.');RNReactNativeStarPrinter.EVENT={COMMUNICATING:"COMMUNICATING",COMMUNICATED:"COMMUNICATED",CONNECTING:"CONNECTING",CONNECTED:"CONNECTED",DISCONNECTED:"DISCONNECTED",SEARCHING:"SEARCHING",SEARCHED:"SEARCHED",STATUS_CHANGED:"STATUS_CHANGED"},RNReactNativeStarPrinter.STATUS={CASHDRAWER_OPEN:"CASHDRAWER_OPEN",CASHDRAWER_CLOSE:"CASHDRAWER_CLOSE",ACCESSORY_CONNECT_SUCCESS:"ACCESSORY_CONNECT_SUCCESS",ACCESSORY_CONNECT_FAILURE:"ACCESSORY_CONNECT_FAILURE",ACCESSORY_DISCONNECT:"ACCESSORY_DISCONNECT",PRINTER_IMPOSSIBLE:"PRINTER_IMPOSSIBLE",PRINTER_OFFLINE:"PRINTER_OFFLINE",PRINTER_ONLINE:"PRINTER_ONLINE",PRINTER_PAPER_READY:"PRINTER_PAPER_READY",PRINTER_PAPER_NEAR_EMPTY:"PRINTER_PAPER_NEAR_EMPTY",PRINTER_PAPER_EMPTY:"PRINTER_PAPER_EMPTY",PRINTER_COVER_OPEN:"PRINTER_COVER_OPEN",PRINTER_COVER_CLOSE:"PRINTER_COVER_CLOSE",BARCODE_READER_IMPOSSIBLE:"BARCODE_READER_IMPOSSIBLE",BARCODE_READER_CONNECT:"BARCODE_READER_CONNECT",BARCODE_READER_DISCONNECT:"BARCODE_READER_DISCONNECT",BARCODE_DATA_RECEIVE:"BARCODE_DATA_RECEIVE"},RNReactNativeStarPrinter.invoice=async(e,t,E,R)=>(t.qrCodeLLevel||(t.qrCodeLLevel="M"),t.qrCodeLSize||(t.qrCodeLSize=4),t.qrCodeLPosition||(t.qrCodeLPosition=35),t.qrCodeRLevel||(t.qrCodeRLevel="L"),t.qrCodeRSize||(t.qrCodeRSize=5),t.qrCodeRPosition||(t.qrCodeRPosition=220),E?await RNReactNativeStarPrinter.printInvoice(e,t,E,R):await RNReactNativeStarPrinter.printInvoice(e,t,null,R)),RNReactNativeStarPrinter.on=(e,t)=>{const E=RNReactNativeStarPrinter.EVENT[e];if(!E)throw new Error("@index.js: Invalid event");return EventEmitter.removeAllListeners(E),EventEmitter.addListener(E,t)},RNReactNativeStarPrinter.onOnce=(e,t)=>{const E=RNReactNativeStarPrinter.EVENT[e];if(!E)throw new Error("@index.js: Invalid event");return EventEmitter.removeAllListeners(E),EventEmitter.once(E,t)},RNReactNativeStarPrinter.emit=e=>(console.log("emit=>",e),EventEmitter.emit(e)),RNReactNativeStarPrinter.removeAllListeners=()=>(console.log("EventEmitter=>",EventEmitter),EventEmitter.removeAllListeners()),RNReactNativeStarPrinter.removeOneListeners=e=>(console.log("removeOneListeners=>",e),console.log("EventEmitter=>",EventEmitter),EventEmitter.removeAllListeners(e));export default RNReactNativeStarPrinter;
//# sourceMappingURL=/sm/0abd5f75afd66a712d6f10242ab9dad67de0eb46ba3a269665edbab4a0463f0f.map