//
//  BigCrunchBannerViewManager.m
//  BigCrunch Mobile Ads SDK - React Native Bridge
//
//  This file exposes the Swift BigCrunchBannerViewManager to React Native
//

#import <React/RCTViewManager.h>

@interface RCT_EXTERN_MODULE(BigCrunchBannerViewManager, RCTViewManager)

// Properties
RCT_EXPORT_VIEW_PROPERTY(placementId, NSString)
RCT_EXPORT_VIEW_PROPERTY(size, NSString)
RCT_EXPORT_VIEW_PROPERTY(customWidth, NSNumber)
RCT_EXPORT_VIEW_PROPERTY(customHeight, NSNumber)
RCT_EXPORT_VIEW_PROPERTY(autoLoad, BOOL)
RCT_EXPORT_VIEW_PROPERTY(refreshInterval, NSNumber)
RCT_EXPORT_VIEW_PROPERTY(customTargeting, NSDictionary)
RCT_EXPORT_VIEW_PROPERTY(viewId, NSString)

// Event callbacks
RCT_EXPORT_VIEW_PROPERTY(onAdLoaded, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdFailedToLoad, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdOpened, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdClosed, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdClicked, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAdImpression, RCTDirectEventBlock)

// Methods
RCT_EXTERN_METHOD(loadAd:(nonnull NSNumber *)node)
RCT_EXTERN_METHOD(pauseAd:(nonnull NSNumber *)node)
RCT_EXTERN_METHOD(resumeAd:(nonnull NSNumber *)node)
RCT_EXTERN_METHOD(destroy:(nonnull NSNumber *)node)

@end
