
#import "BluestackBannerView.h"
#import <React/RCTUIManager.h>
#import <React/RCTViewManager.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>

@interface RCT_EXTERN_MODULE(BluestackModuleViewManager, RCTViewManager)

// Properties
RCT_EXPORT_VIEW_PROPERTY(placementId, NSString)
RCT_EXPORT_VIEW_PROPERTY(preference, NSString)
RCT_EXPORT_VIEW_PROPERTY(adSize, NSString)
RCT_EXPORT_VIEW_PROPERTY(width, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(height, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(shouldLoadWhenReady, BOOL)
RCT_EXPORT_VIEW_PROPERTY(shouldLoadNow, BOOL)

// Event callbacks
RCT_EXPORT_VIEW_PROPERTY(onAdLoaded, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdFailedToLoad, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdRefreshed, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdFailedToRefresh, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdClicked, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdLoadCalled, RCTBubblingEventBlock)

// Methods
RCT_EXTERN_METHOD(create:(nonnull NSNumber *)reactTag
                  setPreference:(NSString *)preferenceJSON)

RCT_EXTERN_METHOD(destroy:(nonnull NSNumber *)reactTag)

RCT_EXTERN_METHOD(refresh:(nonnull NSNumber *)reactTag
                  setState:(BOOL)state)

@end
