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

#pragma once

#include <ReactCommon/TurboModule.h>
#include <react/bridging/Bridging.h>

namespace facebook::react {


  class JSI_EXPORT NativeAdSettingsCxxSpecJSI : public TurboModule {
protected:
  NativeAdSettingsCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);

public:
  virtual jsi::Value initialize(jsi::Runtime &rt) = 0;
  virtual bool isInitialized(jsi::Runtime &rt) = 0;
  virtual void addTestDevice(jsi::Runtime &rt, jsi::String deviceHash) = 0;
  virtual jsi::String getCurrentDeviceHash(jsi::Runtime &rt) = 0;
  virtual void clearTestDevices(jsi::Runtime &rt) = 0;
  virtual void setDataProcessingOptions(jsi::Runtime &rt, jsi::Array options, std::optional<double> country, std::optional<double> state) = 0;
  virtual void setLogLevel(jsi::Runtime &rt, jsi::String level) = 0;
  virtual void setAdvertiserIDCollectionEnabled(jsi::Runtime &rt, bool enabled) = 0;
  virtual void setAdvertiserTrackingEnabled(jsi::Runtime &rt, bool enabled) = 0;

};

template <typename T>
class JSI_EXPORT NativeAdSettingsCxxSpec : public TurboModule {
public:
  jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
    return delegate_.create(rt, propName);
  }

  std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
    return delegate_.getPropertyNames(runtime);
  }

  static constexpr std::string_view kModuleName = "AdSettings";

protected:
  NativeAdSettingsCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
    : TurboModule(std::string{NativeAdSettingsCxxSpec::kModuleName}, jsInvoker),
      delegate_(reinterpret_cast<T*>(this), jsInvoker) {}


private:
  class Delegate : public NativeAdSettingsCxxSpecJSI {
  public:
    Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
      NativeAdSettingsCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {

    }

    jsi::Value initialize(jsi::Runtime &rt) override {
      static_assert(
          bridging::getParameterCount(&T::initialize) == 1,
          "Expected initialize(...) to have 1 parameters");

      return bridging::callFromJs<jsi::Value>(
          rt, &T::initialize, jsInvoker_, instance_);
    }
    bool isInitialized(jsi::Runtime &rt) override {
      static_assert(
          bridging::getParameterCount(&T::isInitialized) == 1,
          "Expected isInitialized(...) to have 1 parameters");

      return bridging::callFromJs<bool>(
          rt, &T::isInitialized, jsInvoker_, instance_);
    }
    void addTestDevice(jsi::Runtime &rt, jsi::String deviceHash) override {
      static_assert(
          bridging::getParameterCount(&T::addTestDevice) == 2,
          "Expected addTestDevice(...) to have 2 parameters");

      return bridging::callFromJs<void>(
          rt, &T::addTestDevice, jsInvoker_, instance_, std::move(deviceHash));
    }
    jsi::String getCurrentDeviceHash(jsi::Runtime &rt) override {
      static_assert(
          bridging::getParameterCount(&T::getCurrentDeviceHash) == 1,
          "Expected getCurrentDeviceHash(...) to have 1 parameters");

      return bridging::callFromJs<jsi::String>(
          rt, &T::getCurrentDeviceHash, jsInvoker_, instance_);
    }
    void clearTestDevices(jsi::Runtime &rt) override {
      static_assert(
          bridging::getParameterCount(&T::clearTestDevices) == 1,
          "Expected clearTestDevices(...) to have 1 parameters");

      return bridging::callFromJs<void>(
          rt, &T::clearTestDevices, jsInvoker_, instance_);
    }
    void setDataProcessingOptions(jsi::Runtime &rt, jsi::Array options, std::optional<double> country, std::optional<double> state) override {
      static_assert(
          bridging::getParameterCount(&T::setDataProcessingOptions) == 4,
          "Expected setDataProcessingOptions(...) to have 4 parameters");

      return bridging::callFromJs<void>(
          rt, &T::setDataProcessingOptions, jsInvoker_, instance_, std::move(options), std::move(country), std::move(state));
    }
    void setLogLevel(jsi::Runtime &rt, jsi::String level) override {
      static_assert(
          bridging::getParameterCount(&T::setLogLevel) == 2,
          "Expected setLogLevel(...) to have 2 parameters");

      return bridging::callFromJs<void>(
          rt, &T::setLogLevel, jsInvoker_, instance_, std::move(level));
    }
    void setAdvertiserIDCollectionEnabled(jsi::Runtime &rt, bool enabled) override {
      static_assert(
          bridging::getParameterCount(&T::setAdvertiserIDCollectionEnabled) == 2,
          "Expected setAdvertiserIDCollectionEnabled(...) to have 2 parameters");

      return bridging::callFromJs<void>(
          rt, &T::setAdvertiserIDCollectionEnabled, jsInvoker_, instance_, std::move(enabled));
    }
    void setAdvertiserTrackingEnabled(jsi::Runtime &rt, bool enabled) override {
      static_assert(
          bridging::getParameterCount(&T::setAdvertiserTrackingEnabled) == 2,
          "Expected setAdvertiserTrackingEnabled(...) to have 2 parameters");

      return bridging::callFromJs<void>(
          rt, &T::setAdvertiserTrackingEnabled, jsInvoker_, instance_, std::move(enabled));
    }

  private:
    friend class NativeAdSettingsCxxSpec;
    T *instance_;
  };

  Delegate delegate_;
};


  class JSI_EXPORT NativeInterstitialAdManagerCxxSpecJSI : public TurboModule {
protected:
  NativeInterstitialAdManagerCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);

public:
  virtual jsi::Value loadAd(jsi::Runtime &rt, jsi::String placementId) = 0;
  virtual jsi::Value showAd(jsi::Runtime &rt, jsi::String placementId) = 0;

};

template <typename T>
class JSI_EXPORT NativeInterstitialAdManagerCxxSpec : public TurboModule {
public:
  jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
    return delegate_.create(rt, propName);
  }

  std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
    return delegate_.getPropertyNames(runtime);
  }

  static constexpr std::string_view kModuleName = "InterstitialAdManager";

protected:
  NativeInterstitialAdManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
    : TurboModule(std::string{NativeInterstitialAdManagerCxxSpec::kModuleName}, jsInvoker),
      delegate_(reinterpret_cast<T*>(this), jsInvoker) {}

  void emitOnInterstitialDismissed() {
    static_cast<AsyncEventEmitter<>&>(*delegate_.eventEmitterMap_["onInterstitialDismissed"]).emit();
  }

private:
  class Delegate : public NativeInterstitialAdManagerCxxSpecJSI {
  public:
    Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
      NativeInterstitialAdManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
      eventEmitterMap_["onInterstitialDismissed"] = std::make_shared<AsyncEventEmitter<>>();
    }

    jsi::Value loadAd(jsi::Runtime &rt, jsi::String placementId) override {
      static_assert(
          bridging::getParameterCount(&T::loadAd) == 2,
          "Expected loadAd(...) to have 2 parameters");

      return bridging::callFromJs<jsi::Value>(
          rt, &T::loadAd, jsInvoker_, instance_, std::move(placementId));
    }
    jsi::Value showAd(jsi::Runtime &rt, jsi::String placementId) override {
      static_assert(
          bridging::getParameterCount(&T::showAd) == 2,
          "Expected showAd(...) to have 2 parameters");

      return bridging::callFromJs<jsi::Value>(
          rt, &T::showAd, jsInvoker_, instance_, std::move(placementId));
    }

  private:
    friend class NativeInterstitialAdManagerCxxSpec;
    T *instance_;
  };

  Delegate delegate_;
};


  class JSI_EXPORT NativeRewardedAdManagerCxxSpecJSI : public TurboModule {
protected:
  NativeRewardedAdManagerCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);

public:
  virtual jsi::Value loadAd(jsi::Runtime &rt, jsi::String placementId) = 0;
  virtual jsi::Value showAd(jsi::Runtime &rt, jsi::String placementId) = 0;

};

template <typename T>
class JSI_EXPORT NativeRewardedAdManagerCxxSpec : public TurboModule {
public:
  jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
    return delegate_.create(rt, propName);
  }

  std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
    return delegate_.getPropertyNames(runtime);
  }

  static constexpr std::string_view kModuleName = "RewardedAdManager";

protected:
  NativeRewardedAdManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
    : TurboModule(std::string{NativeRewardedAdManagerCxxSpec::kModuleName}, jsInvoker),
      delegate_(reinterpret_cast<T*>(this), jsInvoker) {}

  void emitOnRewardedVideoCompleted() {
    static_cast<AsyncEventEmitter<>&>(*delegate_.eventEmitterMap_["onRewardedVideoCompleted"]).emit();
  }

private:
  class Delegate : public NativeRewardedAdManagerCxxSpecJSI {
  public:
    Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
      NativeRewardedAdManagerCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
      eventEmitterMap_["onRewardedVideoCompleted"] = std::make_shared<AsyncEventEmitter<>>();
    }

    jsi::Value loadAd(jsi::Runtime &rt, jsi::String placementId) override {
      static_assert(
          bridging::getParameterCount(&T::loadAd) == 2,
          "Expected loadAd(...) to have 2 parameters");

      return bridging::callFromJs<jsi::Value>(
          rt, &T::loadAd, jsInvoker_, instance_, std::move(placementId));
    }
    jsi::Value showAd(jsi::Runtime &rt, jsi::String placementId) override {
      static_assert(
          bridging::getParameterCount(&T::showAd) == 2,
          "Expected showAd(...) to have 2 parameters");

      return bridging::callFromJs<jsi::Value>(
          rt, &T::showAd, jsInvoker_, instance_, std::move(placementId));
    }

  private:
    friend class NativeRewardedAdManagerCxxSpec;
    T *instance_;
  };

  Delegate delegate_;
};

} // namespace facebook::react
