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

public:
  virtual jsi::Object getConstants(jsi::Runtime &rt) = 0;
  virtual jsi::Value hide(jsi::Runtime &rt, bool fade) = 0;
  virtual jsi::Value isVisible(jsi::Runtime &rt) = 0;

};

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

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

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


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

    }

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

      return bridging::callFromJs<jsi::Object>(
          rt, &T::getConstants, jsInvoker_, instance_);
    }
    jsi::Value hide(jsi::Runtime &rt, bool fade) override {
      static_assert(
          bridging::getParameterCount(&T::hide) == 2,
          "Expected hide(...) to have 2 parameters");

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

      return bridging::callFromJs<jsi::Value>(
          rt, &T::isVisible, jsInvoker_, instance_);
    }

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

  Delegate delegate_;
};

} // namespace facebook::react
