#import <React/RCTViewManager.h>

@interface RCT_EXTERN_MODULE(BlazeWidgetViewManagerBase, RCTViewManager)

//------ Shared ------//

RCT_EXPORT_VIEW_PROPERTY(dataSource, NSDictionary *)
RCT_EXPORT_VIEW_PROPERTY(blazeWidgetLayout, NSDictionary *)
RCT_EXPORT_VIEW_PROPERTY(perItemStyleOverridesInternal, NSDictionary *)

RCT_EXPORT_VIEW_PROPERTY(presetWidgetLayout, NSString *)
RCT_EXPORT_VIEW_PROPERTY(cachingLevel, NSString *)
RCT_EXPORT_VIEW_PROPERTY(isEmbeddedInScrollView, BOOL)
RCT_EXPORT_VIEW_PROPERTY(appOverridesCTAHandling, BOOL)
RCT_EXPORT_VIEW_PROPERTY(shouldOrderWidgetByReadStatus, BOOL)

RCT_EXPORT_VIEW_PROPERTY(onWidgetDataLoadStartedInternal, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onWidgetDataLoadCompletedInternal, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onItemClickedInternal, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onWidgetPlayerDidAppearInternal, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onWidgetPlayerDismissedInternal, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onTriggerCTAInternal, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onTriggerPlayerBodyTextLinkInternal, RCTBubblingEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onPlayerEventTriggeredInternal, RCTBubblingEventBlock)

RCT_EXTERN_METHOD(reloadData: (nonnull NSNumber *)node
                  isSilentRefresh: (BOOL)isSilentRefresh)
RCT_EXTERN_METHOD(updateDataSource: (nonnull NSNumber *)node
                  dataSource: (NSDictionary *)dataSource
                  isSilentRefresh: (BOOL)isSilentRefresh)
RCT_EXTERN_METHOD(play: (nonnull NSNumber *)node)
RCT_EXTERN_METHOD(updateOverrideStyles: (nonnull NSNumber *)node
                  perItemStyleOverrides: (NSDictionary *)perItemStyleOverrides
                  shouldUpdateUi: (BOOL)shouldUpdateUi)
RCT_EXTERN_METHOD(updateWidgetsUi: (nonnull NSNumber *)node)

//------ Moments specific ------//

RCT_EXPORT_VIEW_PROPERTY(blazeMomentsPlayerStyle, NSDictionary *)

//------ Stories specific ------//

RCT_EXPORT_VIEW_PROPERTY(blazeStoryPlayerStyle, NSDictionary *)

@end
