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

public:
  virtual jsi::Value enterFullscreen(jsi::Runtime &rt) = 0;
  virtual jsi::Value exitFullscreen(jsi::Runtime &rt) = 0;
  virtual jsi::Value isFullscreen(jsi::Runtime &rt) = 0;

};

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

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


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

    }

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

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

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

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

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

  Delegate delegate_;
};

} // namespace facebook::react
