
/**
 * 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: GenerateModuleJniCpp.js
 */

#include "RNMetaAdsSpec.h"

namespace facebook::react {

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_initialize(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "initialize", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_isInitialized(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, BooleanKind, "isInitialized", "()Z", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_addTestDevice(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "addTestDevice", "(Ljava/lang/String;)V", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_getCurrentDeviceHash(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "getCurrentDeviceHash", "()Ljava/lang/String;", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_clearTestDevices(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "clearTestDevices", "()V", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_setDataProcessingOptions(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "setDataProcessingOptions", "(Lcom/facebook/react/bridge/ReadableArray;Ljava/lang/Double;Ljava/lang/Double;)V", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_setLogLevel(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "setLogLevel", "(Ljava/lang/String;)V", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_setAdvertiserIDCollectionEnabled(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "setAdvertiserIDCollectionEnabled", "(Z)V", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeAdSettingsSpecJSI_setAdvertiserTrackingEnabled(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "setAdvertiserTrackingEnabled", "(Z)V", args, count, cachedMethodId);
}

NativeAdSettingsSpecJSI::NativeAdSettingsSpecJSI(const JavaTurboModule::InitParams &params)
  : JavaTurboModule(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};
}
static facebook::jsi::Value __hostFunction_NativeInterstitialAdManagerSpecJSI_loadAd(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "loadAd", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeInterstitialAdManagerSpecJSI_showAd(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "showAd", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
}

NativeInterstitialAdManagerSpecJSI::NativeInterstitialAdManagerSpecJSI(const JavaTurboModule::InitParams &params)
  : JavaTurboModule(params) {
  methodMap_["loadAd"] = MethodMetadata {1, __hostFunction_NativeInterstitialAdManagerSpecJSI_loadAd};
  methodMap_["showAd"] = MethodMetadata {1, __hostFunction_NativeInterstitialAdManagerSpecJSI_showAd};
  eventEmitterMap_["onInterstitialDismissed"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
  setEventEmitterCallback(params.instance);
}
static facebook::jsi::Value __hostFunction_NativeRewardedAdManagerSpecJSI_loadAd(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "loadAd", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
}

static facebook::jsi::Value __hostFunction_NativeRewardedAdManagerSpecJSI_showAd(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
  static jmethodID cachedMethodId = nullptr;
  return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "showAd", "(Ljava/lang/String;Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
}

NativeRewardedAdManagerSpecJSI::NativeRewardedAdManagerSpecJSI(const JavaTurboModule::InitParams &params)
  : JavaTurboModule(params) {
  methodMap_["loadAd"] = MethodMetadata {1, __hostFunction_NativeRewardedAdManagerSpecJSI_loadAd};
  methodMap_["showAd"] = MethodMetadata {1, __hostFunction_NativeRewardedAdManagerSpecJSI_showAd};
  eventEmitterMap_["onRewardedVideoCompleted"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
  setEventEmitterCallback(params.instance);
}

std::shared_ptr<TurboModule> RNMetaAdsSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
  if (moduleName == "AdSettings") {
    return std::make_shared<NativeAdSettingsSpecJSI>(params);
  }
  if (moduleName == "InterstitialAdManager") {
    return std::make_shared<NativeInterstitialAdManagerSpecJSI>(params);
  }
  if (moduleName == "RewardedAdManager") {
    return std::make_shared<NativeRewardedAdManagerSpecJSI>(params);
  }
  return nullptr;
}

} // namespace facebook::react
