/**
 * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
 *
 * Do not edit this file as changes may cause incorrect behavior and will be lost
 * once the code is regenerated.
 *
 * @generated by codegen project: GenerateModuleObjCpp
 *
 * We create an umbrella header (and corresponding implementation) here since
 * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
 * must have a single output. More files => more genrule()s => slower builds.
 */

#import "RNEscPosPrinterSpec.h"


@implementation NativeEscPosPrinterSpecBase


- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
{
  _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
}
@end


namespace facebook::react {
  
    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_initWithPrinterDeviceName(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "initWithPrinterDeviceName", @selector(initWithPrinterDeviceName:deviceName:lang:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_connect(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "connect", @selector(connect:timeout:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_disconnect(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "disconnect", @selector(disconnect:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_clearCommandBuffer(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "clearCommandBuffer", @selector(clearCommandBuffer:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addText(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addText", @selector(addText:data:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addTextLang(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addTextLang", @selector(addTextLang:lang:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addFeedLine(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addFeedLine", @selector(addFeedLine:line:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addLineSpace(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addLineSpace", @selector(addLineSpace:linespc:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addCut(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addCut", @selector(addCut:type:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_sendData(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "sendData", @selector(sendData:timeout:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_getPrinterSetting(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getPrinterSetting", @selector(getPrinterSetting:timeout:type:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_getStatus(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getStatus", @selector(getStatus:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addImage(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addImage", @selector(addImage:source:width:color:mode:halftone:brightness:compress:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addBarcode(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addBarcode", @selector(addBarcode:data:type:hri:font:width:height:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addSymbol(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addSymbol", @selector(addSymbol:data:type:level:width:height:size:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addCommand(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addCommand", @selector(addCommand:data:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addPulse(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addPulse", @selector(addPulse:drawer:time:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addTextAlign(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addTextAlign", @selector(addTextAlign:align:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addTextSize(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addTextSize", @selector(addTextSize:width:height:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addTextSmooth(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addTextSmooth", @selector(addTextSmooth:smooth:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_addTextStyle(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "addTextStyle", @selector(addTextStyle:reverse:ul:em:color:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterSpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ObjectKind, "getConstants", @selector(getConstants), args, count);
    }

  NativeEscPosPrinterSpecJSI::NativeEscPosPrinterSpecJSI(const ObjCTurboModule::InitParams &params)
    : ObjCTurboModule(params) {
      
        methodMap_["initWithPrinterDeviceName"] = MethodMetadata {3, __hostFunction_NativeEscPosPrinterSpecJSI_initWithPrinterDeviceName};
        
        
        methodMap_["connect"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_connect};
        
        
        methodMap_["disconnect"] = MethodMetadata {1, __hostFunction_NativeEscPosPrinterSpecJSI_disconnect};
        
        
        methodMap_["clearCommandBuffer"] = MethodMetadata {1, __hostFunction_NativeEscPosPrinterSpecJSI_clearCommandBuffer};
        
        
        methodMap_["addText"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_addText};
        
        
        methodMap_["addTextLang"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_addTextLang};
        
        
        methodMap_["addFeedLine"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_addFeedLine};
        
        
        methodMap_["addLineSpace"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_addLineSpace};
        
        
        methodMap_["addCut"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_addCut};
        
        
        methodMap_["sendData"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_sendData};
        
        
        methodMap_["getPrinterSetting"] = MethodMetadata {3, __hostFunction_NativeEscPosPrinterSpecJSI_getPrinterSetting};
        
        
        methodMap_["getStatus"] = MethodMetadata {1, __hostFunction_NativeEscPosPrinterSpecJSI_getStatus};
        
        
        methodMap_["addImage"] = MethodMetadata {8, __hostFunction_NativeEscPosPrinterSpecJSI_addImage};
        
        
        methodMap_["addBarcode"] = MethodMetadata {7, __hostFunction_NativeEscPosPrinterSpecJSI_addBarcode};
        
        
        methodMap_["addSymbol"] = MethodMetadata {7, __hostFunction_NativeEscPosPrinterSpecJSI_addSymbol};
        
        
        methodMap_["addCommand"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_addCommand};
        
        
        methodMap_["addPulse"] = MethodMetadata {3, __hostFunction_NativeEscPosPrinterSpecJSI_addPulse};
        
        
        methodMap_["addTextAlign"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_addTextAlign};
        
        
        methodMap_["addTextSize"] = MethodMetadata {3, __hostFunction_NativeEscPosPrinterSpecJSI_addTextSize};
        
        
        methodMap_["addTextSmooth"] = MethodMetadata {2, __hostFunction_NativeEscPosPrinterSpecJSI_addTextSmooth};
        
        
        methodMap_["addTextStyle"] = MethodMetadata {5, __hostFunction_NativeEscPosPrinterSpecJSI_addTextStyle};
        
        
        methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeEscPosPrinterSpecJSI_getConstants};
        
  }
} // namespace facebook::react

@implementation NativeEscPosPrinterDiscoverySpecBase
- (void)emitOnDiscovery:(NSArray<id<NSObject>> *)value
{
  _eventEmitterCallback("onDiscovery", value);
}
- (void)emitEnableLocationSettingSuccess
{
  _eventEmitterCallback("enableLocationSettingSuccess", nil);
}
- (void)emitEnableLocationSettingFailure
{
  _eventEmitterCallback("enableLocationSettingFailure", nil);
}

- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
{
  _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
}
@end


namespace facebook::react {
  
    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_startDiscovery(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "startDiscovery", @selector(startDiscovery:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_stopDiscovery(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "stopDiscovery", @selector(stopDiscovery:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_enableLocationSetting(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "enableLocationSetting", @selector(enableLocationSetting:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_pairBluetoothDevice(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "pairBluetoothDevice", @selector(pairBluetoothDevice:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_getConstants(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, ObjectKind, "getConstants", @selector(getConstants), args, count);
    }

  NativeEscPosPrinterDiscoverySpecJSI::NativeEscPosPrinterDiscoverySpecJSI(const ObjCTurboModule::InitParams &params)
    : ObjCTurboModule(params) {
      
        methodMap_["startDiscovery"] = MethodMetadata {1, __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_startDiscovery};
        
        
        methodMap_["stopDiscovery"] = MethodMetadata {0, __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_stopDiscovery};
        
        
        methodMap_["enableLocationSetting"] = MethodMetadata {0, __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_enableLocationSetting};
        
        
        methodMap_["pairBluetoothDevice"] = MethodMetadata {1, __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_pairBluetoothDevice};
        
        
        methodMap_["getConstants"] = MethodMetadata {0, __hostFunction_NativeEscPosPrinterDiscoverySpecJSI_getConstants};
        
        eventEmitterMap_["onDiscovery"] = std::make_shared<AsyncEventEmitter<id>>();
        eventEmitterMap_["enableLocationSettingSuccess"] = std::make_shared<AsyncEventEmitter<id>>();
        eventEmitterMap_["enableLocationSettingFailure"] = std::make_shared<AsyncEventEmitter<id>>();
        setEventEmitterCallback([&](const std::string &name, id value) {
          static_cast<AsyncEventEmitter<id> &>(*eventEmitterMap_[name]).emit(value);
        });
  }
} // namespace facebook::react
