//
//  Created by Trulioo Inc. on 2024-05-02.
//

#import <Foundation/Foundation.h>
#import "React/RCTBridgeModule.h"
#import <React/RCTEventEmitter.h>

@interface RCT_EXTERN_MODULE(TruliooCaptureSdkModule, NSObject)

RCT_EXTERN_METHOD(initialize: (NSString)shortCode usePreview:(BOOL)usePreview resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(createCameraComponent: (NSString)configJson)

RCT_EXTERN_METHOD(startFeedbackPromise: (NSString)cameraId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(startFeedbackCallback: (NSString)cameraId eventName:(NSString)eventName)

RCT_EXTERN_METHOD(onFeedbackState: (NSString)eventName)

RCT_EXTERN_METHOD(stopFeedback: (NSString)cameraId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(verifyImage: (NSString)imageId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(acceptImage: (NSString)imageId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(submitTransaction: (RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(captureLatestFrame: (NSString)cameraId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(resumeCamera: (NSString)cameraId)

RCT_EXTERN_METHOD(close)

+(BOOL)requiresMainQueueSetup {
  return YES;
}

@end
