package co.ab180.airbridge.reactnative.module import co.ab180.airbridge.Airbridge import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.ReactContextBaseJavaModule import com.facebook.react.bridge.ReactMethod import com.facebook.react.bridge.ReadableMap internal class EventInteractor( reactContext: ReactApplicationContext? ) : ReactContextBaseJavaModule(reactContext) { override fun getName(): String = "EventInteractor" @ReactMethod fun trackEvent(category: String, semanticAttributes: ReadableMap?, customAttributes: ReadableMap?) { Airbridge.trackEvent( category = category, semanticAttributes = semanticAttributes?.toHashMap(), customAttributes = customAttributes?.toHashMap() ) } }