///
/// NativeComposeThreadedRuntimeOnLoad.cpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#ifndef BUILDING_NATIVECOMPOSETHREADEDRUNTIME_WITH_GENERATED_CMAKE_PROJECT
#error NativeComposeThreadedRuntimeOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
#endif

#include "NativeComposeThreadedRuntimeOnLoad.hpp"

#include <jni.h>
#include <fbjni/fbjni.h>
#include <NitroModules/HybridObjectRegistry.hpp>

#include "HybridThreadedRuntimeFunctions.hpp"

namespace margelo::nitro::threadedruntime {

int initialize(JavaVM* vm) {
  return facebook::jni::initialize(vm, []() {
    ::margelo::nitro::threadedruntime::registerAllNatives();
  });
}



void registerAllNatives() {
  using namespace margelo::nitro;
  using namespace margelo::nitro::threadedruntime;

  // Register native JNI methods
  

  // Register Nitro Hybrid Objects
  HybridObjectRegistry::registerHybridObjectConstructor(
    "ThreadedRuntimeFunctions",
    []() -> std::shared_ptr<HybridObject> {
      static_assert(std::is_default_constructible_v<HybridThreadedRuntimeFunctions>,
                    "The HybridObject \"HybridThreadedRuntimeFunctions\" is not default-constructible! "
                    "Create a public constructor that takes zero arguments to be able to autolink this HybridObject.");
      return std::make_shared<HybridThreadedRuntimeFunctions>();
    }
  );
}

} // namespace margelo::nitro::threadedruntime
