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

#include "HybridGoogleSignInButtonComponent.hpp"

#include <NitroModules/NitroHash.hpp>
#include <NitroModules/ReactProp.hpp>

namespace margelo::nitro::nitrogooglesignin::views {

  using namespace facebook;

  extern const char HybridGoogleSignInButtonComponentName[] = "GoogleSignInButton";

  HybridGoogleSignInButtonProps::HybridGoogleSignInButtonProps(const react::PropsParserContext& context,
                                                               const HybridGoogleSignInButtonProps& sourceProps,
                                                               const react::RawProps& rawProps):
    react::ViewProps(context, sourceProps, rawProps, filterObjectKeys),
    colorScheme(nitro::ReactProp<GoogleSignInButtonColorScheme>::fromRawValue("GoogleSignInButton", "colorScheme", rawProps, sourceProps.colorScheme)),
    size(nitro::ReactProp<GoogleSignInButtonNativeSize>::fromRawValue("GoogleSignInButton", "size", rawProps, sourceProps.size)),
    disabled(nitro::ReactProp<bool>::fromRawValue("GoogleSignInButton", "disabled", rawProps, sourceProps.disabled)),
    contentAlignment(nitro::ReactProp<std::optional<GoogleSignInButtonContentAlignment>>::fromRawValue("GoogleSignInButton", "contentAlignment", rawProps, sourceProps.contentAlignment)),
    onPress(nitro::ReactProp<std::function<void()>>::fromRawValue("GoogleSignInButton", "onPress", rawProps, sourceProps.onPress)),
    hybridRef(nitro::ReactProp<std::optional<std::function<void(const std::shared_ptr<HybridGoogleSignInButtonSpec>& /* ref */)>>>::fromRawValue("GoogleSignInButton", "hybridRef", rawProps, sourceProps.hybridRef)) { }

  bool HybridGoogleSignInButtonProps::filterObjectKeys(const std::string& propName) {
    switch (hashString(propName)) {
      case hashString("colorScheme"): return true;
      case hashString("size"): return true;
      case hashString("disabled"): return true;
      case hashString("contentAlignment"): return true;
      case hashString("onPress"): return true;
      case hashString("hybridRef"): return true;
      default: return false;
    }
  }

} // namespace margelo::nitro::nitrogooglesignin::views
