/**
 * 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 "RNGrovsWrapperSpec.h"


@implementation NativeGrovsWrapperSpecBase
- (void)emitOnDeeplinkReceived:(NSDictionary *)value
{
  _eventEmitterCallback("onDeeplinkReceived", value);
}

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

@implementation RCTCxxConvert (NativeGrovsWrapper_CustomLinkRedirect)
+ (RCTManagedPointer *)JS_NativeGrovsWrapper_CustomLinkRedirect:(id)json
{
  return facebook::react::managedPointer<JS::NativeGrovsWrapper::CustomLinkRedirect>(json);
}
@end
@implementation RCTCxxConvert (NativeGrovsWrapper_CustomRedirects)
+ (RCTManagedPointer *)JS_NativeGrovsWrapper_CustomRedirects:(id)json
{
  return facebook::react::managedPointer<JS::NativeGrovsWrapper::CustomRedirects>(json);
}
@end
namespace facebook::react {
  
    static facebook::jsi::Value __hostFunction_NativeGrovsWrapperSpecJSI_setIdentifier(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "setIdentifier", @selector(setIdentifier:), args, count);
    }

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

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

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

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

    static facebook::jsi::Value __hostFunction_NativeGrovsWrapperSpecJSI_generateLink(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "generateLink", @selector(generateLink:subtitle:imageURL:data:tags:customRedirects:showPreview:resolve:reject:), args, count);
    }

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

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

  NativeGrovsWrapperSpecJSI::NativeGrovsWrapperSpecJSI(const ObjCTurboModule::InitParams &params)
    : ObjCTurboModule(params) {
      
        methodMap_["setIdentifier"] = MethodMetadata {1, __hostFunction_NativeGrovsWrapperSpecJSI_setIdentifier};
        
        
        methodMap_["setPushToken"] = MethodMetadata {1, __hostFunction_NativeGrovsWrapperSpecJSI_setPushToken};
        
        
        methodMap_["setAttributes"] = MethodMetadata {1, __hostFunction_NativeGrovsWrapperSpecJSI_setAttributes};
        
        
        methodMap_["setSDK"] = MethodMetadata {1, __hostFunction_NativeGrovsWrapperSpecJSI_setSDK};
        
        
        methodMap_["setDebug"] = MethodMetadata {1, __hostFunction_NativeGrovsWrapperSpecJSI_setDebug};
        
        
        methodMap_["generateLink"] = MethodMetadata {7, __hostFunction_NativeGrovsWrapperSpecJSI_generateLink};
        setMethodArgConversionSelector(@"generateLink", 5, @"JS_NativeGrovsWrapper_CustomRedirects:");
        
        methodMap_["displayMessages"] = MethodMetadata {0, __hostFunction_NativeGrovsWrapperSpecJSI_displayMessages};
        
        
        methodMap_["numberOfUnreadMessages"] = MethodMetadata {0, __hostFunction_NativeGrovsWrapperSpecJSI_numberOfUnreadMessages};
        
        eventEmitterMap_["onDeeplinkReceived"] = std::make_shared<AsyncEventEmitter<id>>();
        setEventEmitterCallback([&](const std::string &name, id value) {
          static_cast<AsyncEventEmitter<id> &>(*eventEmitterMap_[name]).emit(value);
        });
  }
} // namespace facebook::react
