//
//  RNScanbotCameraView.h
//  RNScanbotSDK
//
//  Created by Marco Saia on 18.05.21.
//

#ifndef RNScanbotCameraView_h
#define RNScanbotCameraView_h

#import <React/RCTComponent.h>
@import ScanbotSDK;

@interface RNScanbotBarcodeCameraView: UIView<SBSDKBarcodeScannerViewControllerDelegate>

@property UIViewController* _Nullable cameraViewController;
@property NSMutableArray* _Nonnull barcodes;
@property (nonatomic, copy) RCTBubblingEventBlock _Nullable onBarcodeScannerResult;
@property (nonatomic, copy) RCTBubblingEventBlock _Nullable requestComponentReload;
@property (nonatomic) BOOL shouldUseFinderView;
@property (nonatomic, copy) NSDictionary* _Nullable configuration;

- (void) createCameraViewController;
- (UIViewController* _Nullable) getParentViewController;

@end

@interface RNScanbotCameraViewConfiguration: NSObject

// Non-Nullable Properties
@property (nonatomic) CGFloat finderLineWidth;
@property (nonatomic) UIColor* _Nonnull finderLineColor;
@property (nonatomic) UIColor* _Nonnull finderBackgroundColor;
@property (nonatomic) CGFloat finderBackgroundOpacity;
@property (nonatomic) SBSDKAspectRatio* _Nonnull finderAspectRatio;
@property (nonatomic) CGFloat finderMinimumPadding;
@property (nonatomic) CGFloat finderVerticalOffset;


// Nullable Properties (-1 for enums)
@property (nonatomic, copy) NSNumber* _Nullable shouldUseFinderView;
@property (nonatomic, copy) NSNumber* _Nullable flashEnabled;
@property (nonatomic, copy) NSNumber* _Nullable cameraZoomFactor;
@property (nonatomic, copy) NSNumber* _Nullable gs1DecodingEnabled;
@property (nonatomic, copy) NSNumber* _Nullable minimumTextLength;
@property (nonatomic, copy) NSNumber* _Nullable maximumTextLength;
@property (nonatomic, copy) NSArray<SBSDKBarcodeType *>* _Nullable barcodeFormats;
@property (nonatomic, copy) NSArray<SBSDKBarcodeDocumentType *>* _Nullable acceptedDocumentFormats;
@property (nonatomic) SBSDKBarcodeMSIPlesseyChecksumAlgorithm msiPlesseyChecksumAlgorithm;
@property (nonatomic) SBSDKBarcodeEngineMode engineMode;

@end

#endif /* RNScanbotCameraView_h */
