/**
* 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: GenerateComponentHObjCpp.js
*/

#import <Foundation/Foundation.h>
#import <React/RCTDefines.h>
#import <React/RCTLog.h>

NS_ASSUME_NONNULL_BEGIN

@protocol RCTSampleNativeComponentViewProtocol <NSObject>
- (void)changeBackgroundColor:(NSString *)color;
@end

RCT_EXTERN inline void RCTSampleNativeComponentHandleCommand(
  id<RCTSampleNativeComponentViewProtocol> componentView,
  NSString const *commandName,
  NSArray const *args)
{
  if ([commandName isEqualToString:@"changeBackgroundColor"]) {
#if RCT_DEBUG
  if ([args count] != 1) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"SampleNativeComponent", commandName, (int)[args count], 1);
    return;
  }
#endif

  NSObject *arg0 = args[0];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSString class], @"string", @"SampleNativeComponent", commandName, @"1st")) {
    return;
  }
#endif
  NSString * color = (NSString *)arg0;

  [componentView changeBackgroundColor:color];
  return;
}

#if RCT_DEBUG
  RCTLogError(@"%@ received command %@, which is not a supported command.", @"SampleNativeComponent", commandName);
#endif
}

NS_ASSUME_NONNULL_END