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

#include "EventEmitters.h"
#include <jsi/JSIDynamic.h>

namespace facebook::react {

void EnrichedTextInputViewEventEmitter::onInputFocus(OnInputFocus event) const {
  dispatchEvent("inputFocus", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "target", event.target);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onInputBlur(OnInputBlur event) const {
  dispatchEvent("inputBlur", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "target", event.target);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onChangeText(OnChangeText event) const {
  dispatchEvent("changeText", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "value", event.value);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onChangeHtml(OnChangeHtml event) const {
  dispatchEvent("changeHtml", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "value", event.value);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onChangeState(OnChangeState event) const {
  dispatchEvent("changeState", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    {
  auto bold = jsi::Object(runtime);
  bold.setProperty(runtime, "isActive", event.bold.isActive);
  bold.setProperty(runtime, "isConflicting", event.bold.isConflicting);
  bold.setProperty(runtime, "isBlocking", event.bold.isBlocking);
  payload.setProperty(runtime, "bold", bold);
}
{
  auto italic = jsi::Object(runtime);
  italic.setProperty(runtime, "isActive", event.italic.isActive);
  italic.setProperty(runtime, "isConflicting", event.italic.isConflicting);
  italic.setProperty(runtime, "isBlocking", event.italic.isBlocking);
  payload.setProperty(runtime, "italic", italic);
}
{
  auto underline = jsi::Object(runtime);
  underline.setProperty(runtime, "isActive", event.underline.isActive);
  underline.setProperty(runtime, "isConflicting", event.underline.isConflicting);
  underline.setProperty(runtime, "isBlocking", event.underline.isBlocking);
  payload.setProperty(runtime, "underline", underline);
}
{
  auto strikeThrough = jsi::Object(runtime);
  strikeThrough.setProperty(runtime, "isActive", event.strikeThrough.isActive);
  strikeThrough.setProperty(runtime, "isConflicting", event.strikeThrough.isConflicting);
  strikeThrough.setProperty(runtime, "isBlocking", event.strikeThrough.isBlocking);
  payload.setProperty(runtime, "strikeThrough", strikeThrough);
}
{
  auto inlineCode = jsi::Object(runtime);
  inlineCode.setProperty(runtime, "isActive", event.inlineCode.isActive);
  inlineCode.setProperty(runtime, "isConflicting", event.inlineCode.isConflicting);
  inlineCode.setProperty(runtime, "isBlocking", event.inlineCode.isBlocking);
  payload.setProperty(runtime, "inlineCode", inlineCode);
}
{
  auto h1 = jsi::Object(runtime);
  h1.setProperty(runtime, "isActive", event.h1.isActive);
  h1.setProperty(runtime, "isConflicting", event.h1.isConflicting);
  h1.setProperty(runtime, "isBlocking", event.h1.isBlocking);
  payload.setProperty(runtime, "h1", h1);
}
{
  auto h2 = jsi::Object(runtime);
  h2.setProperty(runtime, "isActive", event.h2.isActive);
  h2.setProperty(runtime, "isConflicting", event.h2.isConflicting);
  h2.setProperty(runtime, "isBlocking", event.h2.isBlocking);
  payload.setProperty(runtime, "h2", h2);
}
{
  auto h3 = jsi::Object(runtime);
  h3.setProperty(runtime, "isActive", event.h3.isActive);
  h3.setProperty(runtime, "isConflicting", event.h3.isConflicting);
  h3.setProperty(runtime, "isBlocking", event.h3.isBlocking);
  payload.setProperty(runtime, "h3", h3);
}
{
  auto h4 = jsi::Object(runtime);
  h4.setProperty(runtime, "isActive", event.h4.isActive);
  h4.setProperty(runtime, "isConflicting", event.h4.isConflicting);
  h4.setProperty(runtime, "isBlocking", event.h4.isBlocking);
  payload.setProperty(runtime, "h4", h4);
}
{
  auto h5 = jsi::Object(runtime);
  h5.setProperty(runtime, "isActive", event.h5.isActive);
  h5.setProperty(runtime, "isConflicting", event.h5.isConflicting);
  h5.setProperty(runtime, "isBlocking", event.h5.isBlocking);
  payload.setProperty(runtime, "h5", h5);
}
{
  auto h6 = jsi::Object(runtime);
  h6.setProperty(runtime, "isActive", event.h6.isActive);
  h6.setProperty(runtime, "isConflicting", event.h6.isConflicting);
  h6.setProperty(runtime, "isBlocking", event.h6.isBlocking);
  payload.setProperty(runtime, "h6", h6);
}
{
  auto codeBlock = jsi::Object(runtime);
  codeBlock.setProperty(runtime, "isActive", event.codeBlock.isActive);
  codeBlock.setProperty(runtime, "isConflicting", event.codeBlock.isConflicting);
  codeBlock.setProperty(runtime, "isBlocking", event.codeBlock.isBlocking);
  payload.setProperty(runtime, "codeBlock", codeBlock);
}
{
  auto blockQuote = jsi::Object(runtime);
  blockQuote.setProperty(runtime, "isActive", event.blockQuote.isActive);
  blockQuote.setProperty(runtime, "isConflicting", event.blockQuote.isConflicting);
  blockQuote.setProperty(runtime, "isBlocking", event.blockQuote.isBlocking);
  payload.setProperty(runtime, "blockQuote", blockQuote);
}
{
  auto orderedList = jsi::Object(runtime);
  orderedList.setProperty(runtime, "isActive", event.orderedList.isActive);
  orderedList.setProperty(runtime, "isConflicting", event.orderedList.isConflicting);
  orderedList.setProperty(runtime, "isBlocking", event.orderedList.isBlocking);
  payload.setProperty(runtime, "orderedList", orderedList);
}
{
  auto unorderedList = jsi::Object(runtime);
  unorderedList.setProperty(runtime, "isActive", event.unorderedList.isActive);
  unorderedList.setProperty(runtime, "isConflicting", event.unorderedList.isConflicting);
  unorderedList.setProperty(runtime, "isBlocking", event.unorderedList.isBlocking);
  payload.setProperty(runtime, "unorderedList", unorderedList);
}
{
  auto link = jsi::Object(runtime);
  link.setProperty(runtime, "isActive", event.link.isActive);
  link.setProperty(runtime, "isConflicting", event.link.isConflicting);
  link.setProperty(runtime, "isBlocking", event.link.isBlocking);
  payload.setProperty(runtime, "link", link);
}
{
  auto image = jsi::Object(runtime);
  image.setProperty(runtime, "isActive", event.image.isActive);
  image.setProperty(runtime, "isConflicting", event.image.isConflicting);
  image.setProperty(runtime, "isBlocking", event.image.isBlocking);
  payload.setProperty(runtime, "image", image);
}
{
  auto mention = jsi::Object(runtime);
  mention.setProperty(runtime, "isActive", event.mention.isActive);
  mention.setProperty(runtime, "isConflicting", event.mention.isConflicting);
  mention.setProperty(runtime, "isBlocking", event.mention.isBlocking);
  payload.setProperty(runtime, "mention", mention);
}
{
  auto checkboxList = jsi::Object(runtime);
  checkboxList.setProperty(runtime, "isActive", event.checkboxList.isActive);
  checkboxList.setProperty(runtime, "isConflicting", event.checkboxList.isConflicting);
  checkboxList.setProperty(runtime, "isBlocking", event.checkboxList.isBlocking);
  payload.setProperty(runtime, "checkboxList", checkboxList);
}
payload.setProperty(runtime, "alignment", event.alignment);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onLinkDetected(OnLinkDetected event) const {
  dispatchEvent("linkDetected", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "text", event.text);
payload.setProperty(runtime, "url", event.url);
payload.setProperty(runtime, "start", event.start);
payload.setProperty(runtime, "end", event.end);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onMentionDetected(OnMentionDetected event) const {
  dispatchEvent("mentionDetected", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "text", event.text);
payload.setProperty(runtime, "indicator", event.indicator);
payload.setProperty(runtime, "payload", event.payload);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onMention(OnMention event) const {
  dispatchEvent("mention", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "indicator", event.indicator);
payload.setProperty(runtime, "text", jsi::valueFromDynamic(runtime, event.text));
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onChangeSelection(OnChangeSelection event) const {
  dispatchEvent("changeSelection", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "start", event.start);
payload.setProperty(runtime, "end", event.end);
payload.setProperty(runtime, "text", event.text);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onRequestHtmlResult(OnRequestHtmlResult event) const {
  dispatchEvent("requestHtmlResult", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "requestId", event.requestId);
payload.setProperty(runtime, "html", jsi::valueFromDynamic(runtime, event.html));
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onInputKeyPress(OnInputKeyPress event) const {
  dispatchEvent("inputKeyPress", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "key", event.key);
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onPasteImages(OnPasteImages event) const {
  dispatchEvent("pasteImages", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    
    auto images = jsi::Array(runtime, event.images.size());
    size_t imagesIndex = 0;
    for (auto imagesValue : event.images) {
      auto imagesObject = jsi::Object(runtime);
      imagesObject.setProperty(runtime, "uri", imagesValue.uri);
imagesObject.setProperty(runtime, "type", imagesValue.type);
imagesObject.setProperty(runtime, "width", imagesValue.width);
imagesObject.setProperty(runtime, "height", imagesValue.height);
      images.setValueAtIndex(runtime, imagesIndex++, imagesObject);
    }
    payload.setProperty(runtime, "images", images);
  
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onContextMenuItemPress(OnContextMenuItemPress event) const {
  dispatchEvent("contextMenuItemPress", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "itemText", event.itemText);
payload.setProperty(runtime, "selectedText", event.selectedText);
payload.setProperty(runtime, "selectionStart", event.selectionStart);
payload.setProperty(runtime, "selectionEnd", event.selectionEnd);
{
  auto styleState = jsi::Object(runtime);
  {
    auto bold = jsi::Object(runtime);
    bold.setProperty(runtime, "isActive", event.styleState.bold.isActive);
    bold.setProperty(runtime, "isConflicting", event.styleState.bold.isConflicting);
    bold.setProperty(runtime, "isBlocking", event.styleState.bold.isBlocking);
    styleState.setProperty(runtime, "bold", bold);
  }
  {
    auto italic = jsi::Object(runtime);
    italic.setProperty(runtime, "isActive", event.styleState.italic.isActive);
    italic.setProperty(runtime, "isConflicting", event.styleState.italic.isConflicting);
    italic.setProperty(runtime, "isBlocking", event.styleState.italic.isBlocking);
    styleState.setProperty(runtime, "italic", italic);
  }
  {
    auto underline = jsi::Object(runtime);
    underline.setProperty(runtime, "isActive", event.styleState.underline.isActive);
    underline.setProperty(runtime, "isConflicting", event.styleState.underline.isConflicting);
    underline.setProperty(runtime, "isBlocking", event.styleState.underline.isBlocking);
    styleState.setProperty(runtime, "underline", underline);
  }
  {
    auto strikeThrough = jsi::Object(runtime);
    strikeThrough.setProperty(runtime, "isActive", event.styleState.strikeThrough.isActive);
    strikeThrough.setProperty(runtime, "isConflicting", event.styleState.strikeThrough.isConflicting);
    strikeThrough.setProperty(runtime, "isBlocking", event.styleState.strikeThrough.isBlocking);
    styleState.setProperty(runtime, "strikeThrough", strikeThrough);
  }
  {
    auto inlineCode = jsi::Object(runtime);
    inlineCode.setProperty(runtime, "isActive", event.styleState.inlineCode.isActive);
    inlineCode.setProperty(runtime, "isConflicting", event.styleState.inlineCode.isConflicting);
    inlineCode.setProperty(runtime, "isBlocking", event.styleState.inlineCode.isBlocking);
    styleState.setProperty(runtime, "inlineCode", inlineCode);
  }
  {
    auto h1 = jsi::Object(runtime);
    h1.setProperty(runtime, "isActive", event.styleState.h1.isActive);
    h1.setProperty(runtime, "isConflicting", event.styleState.h1.isConflicting);
    h1.setProperty(runtime, "isBlocking", event.styleState.h1.isBlocking);
    styleState.setProperty(runtime, "h1", h1);
  }
  {
    auto h2 = jsi::Object(runtime);
    h2.setProperty(runtime, "isActive", event.styleState.h2.isActive);
    h2.setProperty(runtime, "isConflicting", event.styleState.h2.isConflicting);
    h2.setProperty(runtime, "isBlocking", event.styleState.h2.isBlocking);
    styleState.setProperty(runtime, "h2", h2);
  }
  {
    auto h3 = jsi::Object(runtime);
    h3.setProperty(runtime, "isActive", event.styleState.h3.isActive);
    h3.setProperty(runtime, "isConflicting", event.styleState.h3.isConflicting);
    h3.setProperty(runtime, "isBlocking", event.styleState.h3.isBlocking);
    styleState.setProperty(runtime, "h3", h3);
  }
  {
    auto h4 = jsi::Object(runtime);
    h4.setProperty(runtime, "isActive", event.styleState.h4.isActive);
    h4.setProperty(runtime, "isConflicting", event.styleState.h4.isConflicting);
    h4.setProperty(runtime, "isBlocking", event.styleState.h4.isBlocking);
    styleState.setProperty(runtime, "h4", h4);
  }
  {
    auto h5 = jsi::Object(runtime);
    h5.setProperty(runtime, "isActive", event.styleState.h5.isActive);
    h5.setProperty(runtime, "isConflicting", event.styleState.h5.isConflicting);
    h5.setProperty(runtime, "isBlocking", event.styleState.h5.isBlocking);
    styleState.setProperty(runtime, "h5", h5);
  }
  {
    auto h6 = jsi::Object(runtime);
    h6.setProperty(runtime, "isActive", event.styleState.h6.isActive);
    h6.setProperty(runtime, "isConflicting", event.styleState.h6.isConflicting);
    h6.setProperty(runtime, "isBlocking", event.styleState.h6.isBlocking);
    styleState.setProperty(runtime, "h6", h6);
  }
  {
    auto codeBlock = jsi::Object(runtime);
    codeBlock.setProperty(runtime, "isActive", event.styleState.codeBlock.isActive);
    codeBlock.setProperty(runtime, "isConflicting", event.styleState.codeBlock.isConflicting);
    codeBlock.setProperty(runtime, "isBlocking", event.styleState.codeBlock.isBlocking);
    styleState.setProperty(runtime, "codeBlock", codeBlock);
  }
  {
    auto blockQuote = jsi::Object(runtime);
    blockQuote.setProperty(runtime, "isActive", event.styleState.blockQuote.isActive);
    blockQuote.setProperty(runtime, "isConflicting", event.styleState.blockQuote.isConflicting);
    blockQuote.setProperty(runtime, "isBlocking", event.styleState.blockQuote.isBlocking);
    styleState.setProperty(runtime, "blockQuote", blockQuote);
  }
  {
    auto orderedList = jsi::Object(runtime);
    orderedList.setProperty(runtime, "isActive", event.styleState.orderedList.isActive);
    orderedList.setProperty(runtime, "isConflicting", event.styleState.orderedList.isConflicting);
    orderedList.setProperty(runtime, "isBlocking", event.styleState.orderedList.isBlocking);
    styleState.setProperty(runtime, "orderedList", orderedList);
  }
  {
    auto unorderedList = jsi::Object(runtime);
    unorderedList.setProperty(runtime, "isActive", event.styleState.unorderedList.isActive);
    unorderedList.setProperty(runtime, "isConflicting", event.styleState.unorderedList.isConflicting);
    unorderedList.setProperty(runtime, "isBlocking", event.styleState.unorderedList.isBlocking);
    styleState.setProperty(runtime, "unorderedList", unorderedList);
  }
  {
    auto link = jsi::Object(runtime);
    link.setProperty(runtime, "isActive", event.styleState.link.isActive);
    link.setProperty(runtime, "isConflicting", event.styleState.link.isConflicting);
    link.setProperty(runtime, "isBlocking", event.styleState.link.isBlocking);
    styleState.setProperty(runtime, "link", link);
  }
  {
    auto image = jsi::Object(runtime);
    image.setProperty(runtime, "isActive", event.styleState.image.isActive);
    image.setProperty(runtime, "isConflicting", event.styleState.image.isConflicting);
    image.setProperty(runtime, "isBlocking", event.styleState.image.isBlocking);
    styleState.setProperty(runtime, "image", image);
  }
  {
    auto mention = jsi::Object(runtime);
    mention.setProperty(runtime, "isActive", event.styleState.mention.isActive);
    mention.setProperty(runtime, "isConflicting", event.styleState.mention.isConflicting);
    mention.setProperty(runtime, "isBlocking", event.styleState.mention.isBlocking);
    styleState.setProperty(runtime, "mention", mention);
  }
  {
    auto checkboxList = jsi::Object(runtime);
    checkboxList.setProperty(runtime, "isActive", event.styleState.checkboxList.isActive);
    checkboxList.setProperty(runtime, "isConflicting", event.styleState.checkboxList.isConflicting);
    checkboxList.setProperty(runtime, "isBlocking", event.styleState.checkboxList.isBlocking);
    styleState.setProperty(runtime, "checkboxList", checkboxList);
  }
  styleState.setProperty(runtime, "alignment", event.styleState.alignment);
  payload.setProperty(runtime, "styleState", styleState);
}
    return payload;
  });
}


void EnrichedTextInputViewEventEmitter::onSubmitEditing(OnSubmitEditing event) const {
  dispatchEvent("submitEditing", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "text", event.text);
    return payload;
  });
}


void EnrichedTextViewEventEmitter::onLinkPress(OnLinkPress event) const {
  dispatchEvent("linkPress", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "url", event.url);
    return payload;
  });
}


void EnrichedTextViewEventEmitter::onMentionPress(OnMentionPress event) const {
  dispatchEvent("mentionPress", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "text", event.text);
payload.setProperty(runtime, "indicator", event.indicator);
payload.setProperty(runtime, "attributes", jsi::valueFromDynamic(runtime, event.attributes));
    return payload;
  });
}

} // namespace facebook::react
