/**
* 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 RCTEnrichedTextInputViewViewProtocol <NSObject>
- (void)focus;
- (void)blur;
- (void)setValue:(NSString *)text;
- (void)setSelection:(NSInteger)start end:(NSInteger)end;
- (void)toggleBold;
- (void)toggleItalic;
- (void)toggleUnderline;
- (void)toggleStrikeThrough;
- (void)toggleInlineCode;
- (void)toggleH1;
- (void)toggleH2;
- (void)toggleH3;
- (void)toggleH4;
- (void)toggleH5;
- (void)toggleH6;
- (void)toggleCodeBlock;
- (void)toggleBlockQuote;
- (void)toggleOrderedList;
- (void)toggleUnorderedList;
- (void)toggleCheckboxList:(BOOL)checked;
- (void)addLink:(NSInteger)start end:(NSInteger)end text:(NSString *)text url:(NSString *)url;
- (void)removeLink:(NSInteger)start end:(NSInteger)end;
- (void)addImage:(NSString *)uri width:(float)width height:(float)height;
- (void)startMention:(NSString *)indicator;
- (void)addMention:(NSString *)indicator text:(NSString *)text payload:(NSString *)payload;
- (void)requestHTML:(NSInteger)requestId;
- (void)setTextAlignment:(NSString *)alignment;
@end

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

  

  [componentView focus];
  return;
}

if ([commandName isEqualToString:@"blur"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView blur];
  return;
}

if ([commandName isEqualToString:@"setValue"]) {
#if RCT_DEBUG
  if ([args count] != 1) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 1);
    return;
  }
#endif

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

  [componentView setValue:text];
  return;
}

if ([commandName isEqualToString:@"setSelection"]) {
#if RCT_DEBUG
  if ([args count] != 2) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 2);
    return;
  }
#endif

  NSObject *arg0 = args[0];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"EnrichedTextInputView", commandName, @"1st")) {
    return;
  }
#endif
  NSInteger start = [(NSNumber *)arg0 intValue];

NSObject *arg1 = args[1];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"EnrichedTextInputView", commandName, @"2nd")) {
    return;
  }
#endif
  NSInteger end = [(NSNumber *)arg1 intValue];

  [componentView setSelection:start end:end];
  return;
}

if ([commandName isEqualToString:@"toggleBold"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleBold];
  return;
}

if ([commandName isEqualToString:@"toggleItalic"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleItalic];
  return;
}

if ([commandName isEqualToString:@"toggleUnderline"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleUnderline];
  return;
}

if ([commandName isEqualToString:@"toggleStrikeThrough"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleStrikeThrough];
  return;
}

if ([commandName isEqualToString:@"toggleInlineCode"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleInlineCode];
  return;
}

if ([commandName isEqualToString:@"toggleH1"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleH1];
  return;
}

if ([commandName isEqualToString:@"toggleH2"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleH2];
  return;
}

if ([commandName isEqualToString:@"toggleH3"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleH3];
  return;
}

if ([commandName isEqualToString:@"toggleH4"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleH4];
  return;
}

if ([commandName isEqualToString:@"toggleH5"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleH5];
  return;
}

if ([commandName isEqualToString:@"toggleH6"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleH6];
  return;
}

if ([commandName isEqualToString:@"toggleCodeBlock"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleCodeBlock];
  return;
}

if ([commandName isEqualToString:@"toggleBlockQuote"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleBlockQuote];
  return;
}

if ([commandName isEqualToString:@"toggleOrderedList"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleOrderedList];
  return;
}

if ([commandName isEqualToString:@"toggleUnorderedList"]) {
#if RCT_DEBUG
  if ([args count] != 0) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 0);
    return;
  }
#endif

  

  [componentView toggleUnorderedList];
  return;
}

if ([commandName isEqualToString:@"toggleCheckboxList"]) {
#if RCT_DEBUG
  if ([args count] != 1) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 1);
    return;
  }
#endif

  NSObject *arg0 = args[0];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"boolean", @"EnrichedTextInputView", commandName, @"1st")) {
    return;
  }
#endif
  BOOL checked = [(NSNumber *)arg0 boolValue];

  [componentView toggleCheckboxList:checked];
  return;
}

if ([commandName isEqualToString:@"addLink"]) {
#if RCT_DEBUG
  if ([args count] != 4) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 4);
    return;
  }
#endif

  NSObject *arg0 = args[0];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"EnrichedTextInputView", commandName, @"1st")) {
    return;
  }
#endif
  NSInteger start = [(NSNumber *)arg0 intValue];

NSObject *arg1 = args[1];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"EnrichedTextInputView", commandName, @"2nd")) {
    return;
  }
#endif
  NSInteger end = [(NSNumber *)arg1 intValue];

NSObject *arg2 = args[2];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSString class], @"string", @"EnrichedTextInputView", commandName, @"3rd")) {
    return;
  }
#endif
  NSString * text = (NSString *)arg2;

NSObject *arg3 = args[3];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg3, [NSString class], @"string", @"EnrichedTextInputView", commandName, @"4th")) {
    return;
  }
#endif
  NSString * url = (NSString *)arg3;

  [componentView addLink:start end:end text:text url:url];
  return;
}

if ([commandName isEqualToString:@"removeLink"]) {
#if RCT_DEBUG
  if ([args count] != 2) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 2);
    return;
  }
#endif

  NSObject *arg0 = args[0];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"EnrichedTextInputView", commandName, @"1st")) {
    return;
  }
#endif
  NSInteger start = [(NSNumber *)arg0 intValue];

NSObject *arg1 = args[1];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"number", @"EnrichedTextInputView", commandName, @"2nd")) {
    return;
  }
#endif
  NSInteger end = [(NSNumber *)arg1 intValue];

  [componentView removeLink:start end:end];
  return;
}

if ([commandName isEqualToString:@"addImage"]) {
#if RCT_DEBUG
  if ([args count] != 3) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 3);
    return;
  }
#endif

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

NSObject *arg1 = args[1];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSNumber class], @"float", @"EnrichedTextInputView", commandName, @"2nd")) {
    return;
  }
#endif
  float width = [(NSNumber *)arg1 floatValue];

NSObject *arg2 = args[2];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSNumber class], @"float", @"EnrichedTextInputView", commandName, @"3rd")) {
    return;
  }
#endif
  float height = [(NSNumber *)arg2 floatValue];

  [componentView addImage:uri width:width height:height];
  return;
}

if ([commandName isEqualToString:@"startMention"]) {
#if RCT_DEBUG
  if ([args count] != 1) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 1);
    return;
  }
#endif

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

  [componentView startMention:indicator];
  return;
}

if ([commandName isEqualToString:@"addMention"]) {
#if RCT_DEBUG
  if ([args count] != 3) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 3);
    return;
  }
#endif

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

NSObject *arg1 = args[1];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg1, [NSString class], @"string", @"EnrichedTextInputView", commandName, @"2nd")) {
    return;
  }
#endif
  NSString * text = (NSString *)arg1;

NSObject *arg2 = args[2];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg2, [NSString class], @"string", @"EnrichedTextInputView", commandName, @"3rd")) {
    return;
  }
#endif
  NSString * payload = (NSString *)arg2;

  [componentView addMention:indicator text:text payload:payload];
  return;
}

if ([commandName isEqualToString:@"requestHTML"]) {
#if RCT_DEBUG
  if ([args count] != 1) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 1);
    return;
  }
#endif

  NSObject *arg0 = args[0];
#if RCT_DEBUG
  if (!RCTValidateTypeOfViewCommandArgument(arg0, [NSNumber class], @"number", @"EnrichedTextInputView", commandName, @"1st")) {
    return;
  }
#endif
  NSInteger requestId = [(NSNumber *)arg0 intValue];

  [componentView requestHTML:requestId];
  return;
}

if ([commandName isEqualToString:@"setTextAlignment"]) {
#if RCT_DEBUG
  if ([args count] != 1) {
    RCTLogError(@"%@ command %@ received %d arguments, expected %d.", @"EnrichedTextInputView", commandName, (int)[args count], 1);
    return;
  }
#endif

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

  [componentView setTextAlignment:alignment];
  return;
}

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

@protocol RCTEnrichedTextViewViewProtocol <NSObject>

@end

NS_ASSUME_NONNULL_END