
/**
 * 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 {
namespace react {

    //------------------------AIRMap------------------------------
    void AIRMapEventEmitter::onMapReady(onMapReadyEvent event) const {
        dispatchEvent("mapReady", [event = std::move(event)](jsi::Runtime &runtime) {
            auto payload = jsi::Object(runtime);
            return payload;
        });
    }

    void AIRMapEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    void AIRMapEventEmitter::onLongPress(onLongPressEvent event) const {
        dispatchEvent("longPress", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    void AIRMapEventEmitter::onRegionChange(onRegionEvent event) const {
        dispatchEvent("regionChange", [event = std::move(event)](jsi::Runtime &runtime) {
            auto region = jsi::Object(runtime);
            region.setProperty(runtime, "latitude", event.region.latitude);
            region.setProperty(runtime, "longitude", event.region.longitude);
            region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
            region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "region", region);
            return payload;
        });
    }

    void AIRMapEventEmitter::onRegionChangeComplete(onRegionEvent event) const {
        dispatchEvent("regionChangeComplete", [event = std::move(event)](jsi::Runtime &runtime) {
            auto region = jsi::Object(runtime);
            region.setProperty(runtime, "latitude", event.region.latitude);
            region.setProperty(runtime, "longitude", event.region.longitude);
            region.setProperty(runtime, "latitudeDelta", event.region.latitudeDelta);
            region.setProperty(runtime, "longitudeDelta", event.region.longitudeDelta);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "region", region);
            return payload;
        });
    }

    void AIRMapEventEmitter::onMarkerPress(onPressEvent event) const {
        dispatchEvent("markerPress", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    void AIRMapEventEmitter::onMarkerDrag(onPressEvent event) const {
        dispatchEvent("markerDrag", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    void AIRMapEventEmitter::onMarkerDragStart(onPressEvent event) const {
        dispatchEvent("markerDragStart", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    void AIRMapEventEmitter::onMarkerDragEnd(onPressEvent event) const {
        dispatchEvent("markerDragEnd", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    void AIRMapEventEmitter::onPoiClick(onPoiClickEvent event) const {
        dispatchEvent("poiClick", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "placeId", event.placeId);
            payload.setProperty(runtime, "name", event.name);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    //------------------------AIRMapMarker------------------------------
    void AIRMapMarkerEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event = std::move(event)](jsi::Runtime &runtime) {
            auto payload = jsi::Object(runtime);
            return payload;
        });
    }

    void AIRMapMarkerEventEmitter::onDrag(onDragEvent event) const {
        dispatchEvent("drag", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    void AIRMapMarkerEventEmitter::onDragStart(onDragStartEvent event) const {
        dispatchEvent("dragStart", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    void AIRMapMarkerEventEmitter::onDragEnd(onDragEndEvent event) const {
        dispatchEvent("dragEnd", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    //------------------------AIRMapPolygon------------------------------
    void AIRMapPolygonEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event = std::move(event)](jsi::Runtime &runtime) {
            auto payload = jsi::Object(runtime);
            return payload;
        });
    }

    //------------------------AIRMapPolyline------------------------------
    void AIRMapPolylineEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event = std::move(event)](jsi::Runtime &runtime) {
            auto payload = jsi::Object(runtime);
            return payload;
        });
    }

    //------------------------AIRMapCircle------------------------------
    void AIRMapCircleEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event = std::move(event)](jsi::Runtime &runtime) {
            auto payload = jsi::Object(runtime);
            return payload;
        });
    }

    //------------------------AIRMapOverlay------------------------------
    void AIRMapOverlayEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event = std::move(event)](jsi::Runtime &runtime) {
            auto payload = jsi::Object(runtime);
            return payload;
        });
    }

    //------------------------AIRMapCluster------------------------------
    void AIRMapClusterEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event](jsi::Runtime &runtime) {
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "points", event.points);
            return payload;
        });
    }

    //------------------------AIRMapCallout------------------------------
    void AIRMapCalloutEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event = std::move(event)](jsi::Runtime &runtime) {
            auto coordinate = jsi::Object(runtime);
            coordinate.setProperty(runtime, "latitude", event.coordinate.latitude);
            coordinate.setProperty(runtime, "longitude", event.coordinate.longitude);
            auto payload = jsi::Object(runtime);
            payload.setProperty(runtime, "coordinate", coordinate);
            return payload;
        });
    }

    //------------------------AIRMapCalloutSubview------------------------------
    void AIRMapCalloutSubviewEventEmitter::onPress(onPressEvent event) const {
        dispatchEvent("press", [event = std::move(event)](jsi::Runtime &runtime) {
            auto payload = jsi::Object(runtime);
            return payload;
        });
    }

} // namespace react
} // namespace facebook
