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

#pragma once

#ifndef RN_SERIALIZABLE_STATE
#error NitroQmblurview was compiled without the 'RN_SERIALIZABLE_STATE' flag. This flag is required for Nitro Views - set it in your CMakeLists!
#endif

#include <fbjni/fbjni.h>
#include <react/fabric/StateWrapperImpl.h>
#include <react/fabric/CoreComponentsRegistry.h>
#include <react/renderer/core/ConcreteComponentDescriptor.h>
#include <NitroModules/NitroDefines.hpp>
#include <NitroModules/JStateWrapper.hpp>
#include "JHybridBlurViewGroupSpec.hpp"
#include "views/HybridBlurViewGroupComponent.hpp"

namespace margelo::nitro::qmblurview::views {

using namespace facebook;

class JHybridBlurViewGroupStateUpdater: public jni::JavaClass<JHybridBlurViewGroupStateUpdater> {
public:
  static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/qmblurview/views/HybridBlurViewGroupStateUpdater;";

public:
  static void updateViewProps(jni::alias_ref<jni::JClass> /* class */,
                              jni::alias_ref<JHybridBlurViewGroupSpec::javaobject> view,
                              jni::alias_ref<JStateWrapper::javaobject> stateWrapperInterface);

public:
  static void registerNatives() {
    // Register JNI calls
    javaClassStatic()->registerNatives({
      makeNativeMethod("updateViewProps", JHybridBlurViewGroupStateUpdater::updateViewProps),
    });
    // Register React Native view component descriptor
    auto provider = react::concreteComponentDescriptorProvider<HybridBlurViewGroupComponentDescriptor>();
    auto providerRegistry = react::CoreComponentsRegistry::sharedProviderRegistry();
    providerRegistry->add(provider);
  }
};

} // namespace margelo::nitro::qmblurview::views
