/*
 * Copyright © Dynamsoft Corporation. All rights reserved.
 *
 */

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

@interface RCT_EXTERN_REMAP_MODULE(DynamsoftCaptureVisionRouterModule, RNDynamsoftCaptureVisionRouter, RCTEventEmitter)

RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(createInstance)

RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(destroyInstance)

RCT_EXTERN_METHOD(setGlobalIntraOpNumThreads:(NSInteger)intraOpNumThreads)

RCT_EXTERN_METHOD(clearDLModelBuffers)

RCT_EXTERN_METHOD(switchCapturingTemplate:(NSString *)templateName
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(startCapturing:(NSString *)templateName
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

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

RCT_EXTERN_METHOD(setInput:(NSString *)key)

RCT_EXTERN_METHOD(getSimplifiedSettings:(NSString *)name
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(updateSettings:(NSDictionary *)dictionary
                  templateName:(NSString *)templateName
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

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

RCT_EXTERN_METHOD(initSettings:(NSString *)content
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(initSettingsFromFile:(NSString *)path
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(outputSettings:(NSString *)name
                  includeDefaultValues:(BOOL)includeDefaultValues
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(outputSettingsToFile:(NSString *)templateName
                  file:(NSString *)path
                  includeDefaultValues:(BOOL)includeDefaultValues
                  resolve:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(continueCRR)

RCT_EXTERN_METHOD(addResultReceiver:(NSString *)event)

RCT_EXTERN_METHOD(removeResultReceiver:(NSString *)event)

RCT_EXTERN_METHOD(removeAllResultListeners)

RCT_EXTERN_METHOD(addFilter:(NSString *)key)

RCT_EXTERN_METHOD(removeFilter:(NSString *)key)

@end
