package com.rninstabugsdk.rninstabugsdk;

import com.instabug.library.Instabug;

import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.ReadableMapKeySetIterator;
import com.facebook.react.bridge.Promise;

import java.util.HashMap;

public class InstabugSDKModule extends ReactContextBaseJavaModule {

  public InstabugSDKModule(ReactApplicationContext reactContext) {
    super(reactContext);
  }

  @Override
  public String getName() {
    return "RNInstabugSDK";
  }

  @ReactMethod
  public void startWithToken(String token, String invocationEvent) {
    // TODO
  }

  @ReactMethod
  public void invoke() {
    // TODO
  }

  @ReactMethod
  public void invokeWithInvocationMode(String invocationMode) {
    // TODO
  }

  @ReactMethod
  public void dismiss() {
    // TODO
  }

  @ReactMethod
  public void setIntroMessageEnabled(boolean isEnabled) {
    // TODO
  }

  @ReactMethod
  public void setUserData(String userData) {
    // TODO
  }

  @ReactMethod
  public void setUserEmail(String userName) {
    // TODO
  }

  @ReactMethod
  public void setEmailFieldRequired(boolean isRequired) {
    // TODO
  }

  @ReactMethod
  public void setCommentFieldRequired(boolean isRequired) {
    // TODO
  }

  @ReactMethod
  public void resetTags() {
    // TODO
  }

  @Override
  public Map<String, Object> getConstants() {
    final Map<String, Object> constants = new HashMap<>();

    // TODO(marK): Implement.
    return constants;
  }

}

@@ -484,16 +484,567 @@
 dule %7B%0A%0A
+  // Invocation Events%0A  private final String INVOCATION_EVENT_NONE = %22none%22;%0A  private final String INVOCATION_EVENT_SHAKE = %22shake%22;%0A  private final String INVOCATION_EVENT_SCREENSHOT = %22screenshot%22;%0A  private final String INVOCATION_EVENT_TWO_FINGERS_SWIPE = %22swipe%22;%0A  private final String INVOCATION_EVENT_FLOATING_BUTTON = %22button%22;%0A%0A  // Invocation Modes%0A  private final String INVOCATION_MODE_NEW_BUG = %22bug%22;%0A%0A  // NOTE(mark): In this version of the SDK, feature -%3E feedback.%0A  private final String INVOCATION_MODE_NEW_FEATURE = %22feedback%22;%0A%0A
   public
@@ -1098,24 +1098,24 @@
 tContext) %7B%0A
-
     super(re
@@ -2133,30 +2133,741 @@
  // 
-TODO(marK): Implement.
+Invocation Events%0A    // TODO(mark): iOS has invocationEventRightEdgePan which Android doesn't%0A    // have.%0A    constants.put(%22invocationEventNone%22, INVOCATION_EVENT_NONE);%0A    constants.put(%22invocationEventShake%22, INVOCATION_EVENT_SHAKE);%0A    constants.put(%22invocationEventScreenshot%22, INVOCATION_EVENT_SCREENSHOT);%0A    constants.put(%22invocationEventTwoFingersSwipe%22, INVOCATION_EVENT_TWO_FINGERS_SWIPE);%0A    constants.put(%22invocationEventFloatingButton%22, INVOCATION_EVENT_FLOATING_BUTTON);%0A%0A    // Invocation Modes%0A    // TODO(mark): iOS has invocationModeNA which Android doesn't have.%0A    constants.put(%22invocationModeNewBug%22, INVOCATION_MODE_NEW_BUG);%0A    constants.put(%22invocationModeNewFeature%22, INVOCATION_MODE_NEW_FEATURE);%0A
 %0A   

Add invocation events and modes