
/**
 * 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"


namespace facebook::react {

void VirtualViewExperimentalEventEmitter::onModeChange(OnModeChange event) const {
  dispatchEvent("modeChange", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "mode", event.mode);
{
  auto targetRect = jsi::Object(runtime);
  targetRect.setProperty(runtime, "x", event.targetRect.x);
  targetRect.setProperty(runtime, "y", event.targetRect.y);
  targetRect.setProperty(runtime, "width", event.targetRect.width);
  targetRect.setProperty(runtime, "height", event.targetRect.height);
  payload.setProperty(runtime, "targetRect", targetRect);
}
{
  auto thresholdRect = jsi::Object(runtime);
  thresholdRect.setProperty(runtime, "x", event.thresholdRect.x);
  thresholdRect.setProperty(runtime, "y", event.thresholdRect.y);
  thresholdRect.setProperty(runtime, "width", event.thresholdRect.width);
  thresholdRect.setProperty(runtime, "height", event.thresholdRect.height);
  payload.setProperty(runtime, "thresholdRect", thresholdRect);
}
    return payload;
  });
}


void VirtualViewEventEmitter::onModeChange(OnModeChange event) const {
  dispatchEvent("modeChange", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "mode", event.mode);
{
  auto targetRect = jsi::Object(runtime);
  targetRect.setProperty(runtime, "x", event.targetRect.x);
  targetRect.setProperty(runtime, "y", event.targetRect.y);
  targetRect.setProperty(runtime, "width", event.targetRect.width);
  targetRect.setProperty(runtime, "height", event.targetRect.height);
  payload.setProperty(runtime, "targetRect", targetRect);
}
{
  auto thresholdRect = jsi::Object(runtime);
  thresholdRect.setProperty(runtime, "x", event.thresholdRect.x);
  thresholdRect.setProperty(runtime, "y", event.thresholdRect.y);
  thresholdRect.setProperty(runtime, "width", event.thresholdRect.width);
  thresholdRect.setProperty(runtime, "height", event.thresholdRect.height);
  payload.setProperty(runtime, "thresholdRect", thresholdRect);
}
    return payload;
  });
}



void AndroidDrawerLayoutEventEmitter::onDrawerSlide(OnDrawerSlide event) const {
  dispatchEvent("drawerSlide", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "offset", event.offset);
    return payload;
  });
}


void AndroidDrawerLayoutEventEmitter::onDrawerStateChanged(OnDrawerStateChanged event) const {
  dispatchEvent("drawerStateChanged", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "drawerState", event.drawerState);
    return payload;
  });
}


void AndroidDrawerLayoutEventEmitter::onDrawerOpen(OnDrawerOpen event) const {
  dispatchEvent("drawerOpen", [](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    
    return payload;
  });
}


void AndroidDrawerLayoutEventEmitter::onDrawerClose(OnDrawerClose event) const {
  dispatchEvent("drawerClose", [](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    
    return payload;
  });
}



void AndroidSwipeRefreshLayoutEventEmitter::onRefresh(OnRefresh event) const {
  dispatchEvent("refresh", [](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    
    return payload;
  });
}


void AndroidSwitchEventEmitter::onChange(OnChange event) const {
  dispatchEvent("change", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "value", event.value);
payload.setProperty(runtime, "target", event.target);
    return payload;
  });
}




void PullToRefreshViewEventEmitter::onRefresh(OnRefresh event) const {
  dispatchEvent("refresh", [](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    
    return payload;
  });
}



void ModalHostViewEventEmitter::onRequestClose(OnRequestClose event) const {
  dispatchEvent("requestClose", [](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    
    return payload;
  });
}


void ModalHostViewEventEmitter::onShow(OnShow event) const {
  dispatchEvent("show", [](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    
    return payload;
  });
}


void ModalHostViewEventEmitter::onDismiss(OnDismiss event) const {
  dispatchEvent("dismiss", [](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    
    return payload;
  });
}


void ModalHostViewEventEmitter::onOrientationChange(OnOrientationChange event) const {
  dispatchEvent("orientationChange", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "orientation", toString(event.orientation));
    return payload;
  });
}



void SwitchEventEmitter::onChange(OnChange event) const {
  dispatchEvent("change", [event=std::move(event)](jsi::Runtime &runtime) {
    auto payload = jsi::Object(runtime);
    payload.setProperty(runtime, "value", event.value);
payload.setProperty(runtime, "target", event.target);
    return payload;
  });
}



} // namespace facebook::react
