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

public:
  virtual jsi::Value requestReview(jsi::Runtime &rt) = 0;
  virtual jsi::Value requestReviewAppGallery(jsi::Runtime &rt) = 0;
  virtual jsi::Value requestReviewGalaxyStore(jsi::Runtime &rt, jsi::String androidPackageName) = 0;

};

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

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


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

    }

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

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

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

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

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

  Delegate delegate_;
};

} // namespace facebook::react
