/**
 * 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: GenerateModuleObjCpp
 *
 * We create an umbrella header (and corresponding implementation) here since
 * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
 * must have a single output. More files => more genrule()s => slower builds.
 */

#import "AuthgearReactNativeSpec.h"


@implementation NativeAuthgearReactNativeSpecBase
- (void)emitOnAuthgearReactNative:(NSDictionary *)value
{
  _eventEmitterCallback("onAuthgearReactNative", value);
}

- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
{
  _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
}
@end


namespace facebook::react {
  
    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_storageGetItem(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "storageGetItem", @selector(storageGetItem:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_storageSetItem(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "storageSetItem", @selector(storageSetItem:value:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_storageDeleteItem(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "storageDeleteItem", @selector(storageDeleteItem:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_getDeviceInfo(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getDeviceInfo", @selector(getDeviceInfo:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_randomBytes(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "randomBytes", @selector(randomBytes:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_sha256String(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "sha256String", @selector(sha256String:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_generateUUID(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "generateUUID", @selector(generateUUID:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_openAuthorizeURL(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "openAuthorizeURL", @selector(openAuthorizeURL:callbackURL:prefersEphemeralWebBrowserSession:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_openAuthorizeURLWithWebView(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "openAuthorizeURLWithWebView", @selector(openAuthorizeURLWithWebView:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_dismiss(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "dismiss", @selector(dismiss:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_getAnonymousKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getAnonymousKey", @selector(getAnonymousKey:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_signAnonymousToken(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "signAnonymousToken", @selector(signAnonymousToken:tokenData:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_createBiometricPrivateKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "createBiometricPrivateKey", @selector(createBiometricPrivateKey:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_signWithBiometricPrivateKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "signWithBiometricPrivateKey", @selector(signWithBiometricPrivateKey:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_removeBiometricPrivateKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "removeBiometricPrivateKey", @selector(removeBiometricPrivateKey:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_checkBiometricSupported(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "checkBiometricSupported", @selector(checkBiometricSupported:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_checkDPoPSupported(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "checkDPoPSupported", @selector(checkDPoPSupported:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_createDPoPPrivateKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "createDPoPPrivateKey", @selector(createDPoPPrivateKey:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_signWithDPoPPrivateKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "signWithDPoPPrivateKey", @selector(signWithDPoPPrivateKey:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_checkDPoPPrivateKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "checkDPoPPrivateKey", @selector(checkDPoPPrivateKey:resolve:reject:), args, count);
    }

    static facebook::jsi::Value __hostFunction_NativeAuthgearReactNativeSpecJSI_computeDPoPJKT(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
      return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "computeDPoPJKT", @selector(computeDPoPJKT:resolve:reject:), args, count);
    }

  NativeAuthgearReactNativeSpecJSI::NativeAuthgearReactNativeSpecJSI(const ObjCTurboModule::InitParams &params)
    : ObjCTurboModule(params) {
      
        methodMap_["storageGetItem"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_storageGetItem};
        
        
        methodMap_["storageSetItem"] = MethodMetadata {2, __hostFunction_NativeAuthgearReactNativeSpecJSI_storageSetItem};
        
        
        methodMap_["storageDeleteItem"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_storageDeleteItem};
        
        
        methodMap_["getDeviceInfo"] = MethodMetadata {0, __hostFunction_NativeAuthgearReactNativeSpecJSI_getDeviceInfo};
        
        
        methodMap_["randomBytes"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_randomBytes};
        
        
        methodMap_["sha256String"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_sha256String};
        
        
        methodMap_["generateUUID"] = MethodMetadata {0, __hostFunction_NativeAuthgearReactNativeSpecJSI_generateUUID};
        
        
        methodMap_["openAuthorizeURL"] = MethodMetadata {3, __hostFunction_NativeAuthgearReactNativeSpecJSI_openAuthorizeURL};
        
        
        methodMap_["openAuthorizeURLWithWebView"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_openAuthorizeURLWithWebView};
        
        
        methodMap_["dismiss"] = MethodMetadata {0, __hostFunction_NativeAuthgearReactNativeSpecJSI_dismiss};
        
        
        methodMap_["getAnonymousKey"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_getAnonymousKey};
        
        
        methodMap_["signAnonymousToken"] = MethodMetadata {2, __hostFunction_NativeAuthgearReactNativeSpecJSI_signAnonymousToken};
        
        
        methodMap_["createBiometricPrivateKey"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_createBiometricPrivateKey};
        
        
        methodMap_["signWithBiometricPrivateKey"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_signWithBiometricPrivateKey};
        
        
        methodMap_["removeBiometricPrivateKey"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_removeBiometricPrivateKey};
        
        
        methodMap_["checkBiometricSupported"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_checkBiometricSupported};
        
        
        methodMap_["checkDPoPSupported"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_checkDPoPSupported};
        
        
        methodMap_["createDPoPPrivateKey"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_createDPoPPrivateKey};
        
        
        methodMap_["signWithDPoPPrivateKey"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_signWithDPoPPrivateKey};
        
        
        methodMap_["checkDPoPPrivateKey"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_checkDPoPPrivateKey};
        
        
        methodMap_["computeDPoPJKT"] = MethodMetadata {1, __hostFunction_NativeAuthgearReactNativeSpecJSI_computeDPoPJKT};
        
        eventEmitterMap_["onAuthgearReactNative"] = std::make_shared<AsyncEventEmitter<id>>();
        setEventEmitterCallback([&](const std::string &name, id value) {
          static_cast<AsyncEventEmitter<id> &>(*eventEmitterMap_[name]).emit(value);
        });
  }
} // namespace facebook::react
