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

#pragma once

#include <NitroModules/ReactProp.hpp>
#include <NitroModules/ViewComponentDescriptor.hpp>
#include <NitroModules/ViewPropsHolderState.hpp>
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/RawProps.h>

#include <string>

#include "GoogleSignInButtonColorScheme.hpp"
#include "GoogleSignInButtonNativeSize.hpp"
#include "GoogleSignInButtonContentAlignment.hpp"
#include <optional>
#include <functional>
#include <memory>
#include "HybridGoogleSignInButtonSpec.hpp"

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

  using namespace facebook;

  /**
   * The name of the actual native View.
   */
  extern const char HybridGoogleSignInButtonComponentName[];

  /**
   * Props for the "GoogleSignInButton" View.
   */
  class HybridGoogleSignInButtonProps final: public react::ViewProps {
  public:
    HybridGoogleSignInButtonProps() = default;
    HybridGoogleSignInButtonProps(const react::PropsParserContext& context,
                                  const HybridGoogleSignInButtonProps& sourceProps,
                                  const react::RawProps& rawProps);

  public:
    nitro::ReactProp<GoogleSignInButtonColorScheme> colorScheme;
    nitro::ReactProp<GoogleSignInButtonNativeSize> size;
    nitro::ReactProp<bool> disabled;
    nitro::ReactProp<std::optional<GoogleSignInButtonContentAlignment>> contentAlignment;
    nitro::ReactProp<std::function<void()>> onPress;
    nitro::ReactProp<std::optional<std::function<void(const std::shared_ptr<HybridGoogleSignInButtonSpec>& /* ref */)>>> hybridRef;

    [[nodiscard]]
    bool hasSameProps(const HybridGoogleSignInButtonProps& other) const noexcept {
      return colorScheme.hasSameValue(other.colorScheme) &&
             size.hasSameValue(other.size) &&
             disabled.hasSameValue(other.disabled) &&
             contentAlignment.hasSameValue(other.contentAlignment) &&
             onPress.hasSameValue(other.onPress) &&
             hybridRef.hasSameValue(other.hybridRef);
    }

    [[nodiscard]]
    bool hasAnyProvidedProps() const noexcept {
      return colorScheme.isProvided() ||
             size.isProvided() ||
             disabled.isProvided() ||
             contentAlignment.isProvided() ||
             onPress.isProvided() ||
             hybridRef.isProvided();
    }

  private:
    static bool filterObjectKeys(const std::string& propName);
  };

  /**
   * State for the "GoogleSignInButton" View.
   */
  using HybridGoogleSignInButtonState = nitro::ViewPropsHolderState<HybridGoogleSignInButtonProps>;

  /**
   * The Shadow Node for the "GoogleSignInButton" View.
   */
  using HybridGoogleSignInButtonShadowNode = react::ConcreteViewShadowNode<HybridGoogleSignInButtonComponentName /* "HybridGoogleSignInButton" */,
                                                                           HybridGoogleSignInButtonProps /* custom props */,
                                                                           react::ViewEventEmitter /* default */,
                                                                           HybridGoogleSignInButtonState /* custom state */>;

  /**
   * The Component Descriptor for the "GoogleSignInButton" View.
   */
  using HybridGoogleSignInButtonComponentDescriptor = nitro::ViewComponentDescriptor<HybridGoogleSignInButtonShadowNode>;

  /* The actual view for "GoogleSignInButton" needs to be implemented in platform-specific code. */

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