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


@implementation NativeAdSettingsSpecBase


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


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

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

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

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

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

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

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

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

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

  NativeAdSettingsSpecJSI::NativeAdSettingsSpecJSI(const ObjCTurboModule::InitParams &params)
    : ObjCTurboModule(params) {
      
        methodMap_["initialize"] = MethodMetadata {0, __hostFunction_NativeAdSettingsSpecJSI_initialize};
        
        
        methodMap_["isInitialized"] = MethodMetadata {0, __hostFunction_NativeAdSettingsSpecJSI_isInitialized};
        
        
        methodMap_["addTestDevice"] = MethodMetadata {1, __hostFunction_NativeAdSettingsSpecJSI_addTestDevice};
        
        
        methodMap_["getCurrentDeviceHash"] = MethodMetadata {0, __hostFunction_NativeAdSettingsSpecJSI_getCurrentDeviceHash};
        
        
        methodMap_["clearTestDevices"] = MethodMetadata {0, __hostFunction_NativeAdSettingsSpecJSI_clearTestDevices};
        
        
        methodMap_["setDataProcessingOptions"] = MethodMetadata {3, __hostFunction_NativeAdSettingsSpecJSI_setDataProcessingOptions};
        
        
        methodMap_["setLogLevel"] = MethodMetadata {1, __hostFunction_NativeAdSettingsSpecJSI_setLogLevel};
        
        
        methodMap_["setAdvertiserIDCollectionEnabled"] = MethodMetadata {1, __hostFunction_NativeAdSettingsSpecJSI_setAdvertiserIDCollectionEnabled};
        
        
        methodMap_["setAdvertiserTrackingEnabled"] = MethodMetadata {1, __hostFunction_NativeAdSettingsSpecJSI_setAdvertiserTrackingEnabled};
        
  }
} // namespace facebook::react

@implementation NativeInterstitialAdManagerSpecBase
- (void)emitOnInterstitialDismissed
{
  _eventEmitterCallback("onInterstitialDismissed", nil);
}

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


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

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

  NativeInterstitialAdManagerSpecJSI::NativeInterstitialAdManagerSpecJSI(const ObjCTurboModule::InitParams &params)
    : ObjCTurboModule(params) {
      
        methodMap_["loadAd"] = MethodMetadata {1, __hostFunction_NativeInterstitialAdManagerSpecJSI_loadAd};
        
        
        methodMap_["showAd"] = MethodMetadata {1, __hostFunction_NativeInterstitialAdManagerSpecJSI_showAd};
        
        eventEmitterMap_["onInterstitialDismissed"] = std::make_shared<AsyncEventEmitter<id>>();
        setEventEmitterCallback([&](const std::string &name, id value) {
          static_cast<AsyncEventEmitter<id> &>(*eventEmitterMap_[name]).emit(value);
        });
  }
} // namespace facebook::react

@implementation NativeRewardedAdManagerSpecBase
- (void)emitOnRewardedVideoCompleted
{
  _eventEmitterCallback("onRewardedVideoCompleted", nil);
}

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


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

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

  NativeRewardedAdManagerSpecJSI::NativeRewardedAdManagerSpecJSI(const ObjCTurboModule::InitParams &params)
    : ObjCTurboModule(params) {
      
        methodMap_["loadAd"] = MethodMetadata {1, __hostFunction_NativeRewardedAdManagerSpecJSI_loadAd};
        
        
        methodMap_["showAd"] = MethodMetadata {1, __hostFunction_NativeRewardedAdManagerSpecJSI_showAd};
        
        eventEmitterMap_["onRewardedVideoCompleted"] = std::make_shared<AsyncEventEmitter<id>>();
        setEventEmitterCallback([&](const std::string &name, id value) {
          static_cast<AsyncEventEmitter<id> &>(*eventEmitterMap_[name]).emit(value);
        });
  }
} // namespace facebook::react
