/**
 * 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 NativeSIDAddressVerificationCxxSpecJSI : public TurboModule {
protected:
  NativeSIDAddressVerificationCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);

public:
  virtual double multiply(jsi::Runtime &rt, double a, double b) = 0;
  virtual jsi::Value startTrackingWithConfig(jsi::Runtime &rt, jsi::String apiKey, jsi::String token, jsi::String refreshToken) = 0;
  virtual void stopTracking(jsi::Runtime &rt) = 0;
  virtual jsi::Value fetchConfiguration(jsi::Runtime &rt, jsi::String apiKey) = 0;
  virtual void addListener(jsi::Runtime &rt, jsi::String eventName) = 0;
  virtual void removeListeners(jsi::Runtime &rt, double count) = 0;

};

template <typename T>
class JSI_EXPORT NativeSIDAddressVerificationCxxSpec : 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 = "SIDAddressVerification";

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


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

    }

    double multiply(jsi::Runtime &rt, double a, double b) override {
      static_assert(
          bridging::getParameterCount(&T::multiply) == 3,
          "Expected multiply(...) to have 3 parameters");

      return bridging::callFromJs<double>(
          rt, &T::multiply, jsInvoker_, instance_, std::move(a), std::move(b));
    }
    jsi::Value startTrackingWithConfig(jsi::Runtime &rt, jsi::String apiKey, jsi::String token, jsi::String refreshToken) override {
      static_assert(
          bridging::getParameterCount(&T::startTrackingWithConfig) == 4,
          "Expected startTrackingWithConfig(...) to have 4 parameters");

      return bridging::callFromJs<jsi::Value>(
          rt, &T::startTrackingWithConfig, jsInvoker_, instance_, std::move(apiKey), std::move(token), std::move(refreshToken));
    }
    void stopTracking(jsi::Runtime &rt) override {
      static_assert(
          bridging::getParameterCount(&T::stopTracking) == 1,
          "Expected stopTracking(...) to have 1 parameters");

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

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

      return bridging::callFromJs<void>(
          rt, &T::addListener, jsInvoker_, instance_, std::move(eventName));
    }
    void removeListeners(jsi::Runtime &rt, double count) override {
      static_assert(
          bridging::getParameterCount(&T::removeListeners) == 2,
          "Expected removeListeners(...) to have 2 parameters");

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

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

  Delegate delegate_;
};

} // namespace facebook::react
