#ifndef RCT_NEW_ARCH_ENABLED

#import <React/RCTViewManager.h>
#import <React/RCTUIManager.h>
#import <React/RCTLog.h>
#import <React/RCTEventDispatcher.h>

#ifndef BasePaperComponent_h
#define BasePaperComponent_h

NS_ASSUME_NONNULL_BEGIN

// MARK: - Component Type Constants

typedef NS_ENUM(NSInteger, RCTCheckoutComponentType) {
    RCTCheckoutComponentTypeCard = 0,
    RCTCheckoutComponentTypeFlow = 1,
    RCTCheckoutComponentTypeApplePay = 2
};

// MARK: - Base Component View

@interface RCTBasePaperComponent : UIView
@property (nonatomic, strong) UIViewController *checkoutVC;
@property (nonatomic, copy) NSDictionary *config;
@property (nonatomic, assign) BOOL componentCreated;
@property (nonatomic, copy) RCTBubblingEventBlock onDimensionsChanged;
@property (nonatomic, assign) RCTCheckoutComponentType componentType;
@property (nonatomic, strong) id actionableComponent;

- (instancetype)initWithComponentType:(RCTCheckoutComponentType)componentType;
- (void)createComponent;
- (void)handleDimensionChange:(CGSize)size;
- (void)submit;
- (void)tokenize;
- (void)update:(NSInteger)amount currency:(NSString *)currency;

@end

// MARK: - Base Manager

@interface RCTBasePaperComponentManager : RCTViewManager
@property (nonatomic, assign) RCTCheckoutComponentType componentType;

- (instancetype)initWithComponentType:(RCTCheckoutComponentType)componentType;

@end

NS_ASSUME_NONNULL_END

#endif /* BasePaperComponent_h */
#endif /* RCT_NEW_ARCH_ENABLED */
