#import <React/RCTBridgeModule.h>

@interface RCT_EXTERN_MODULE(LayersSKAN, NSObject)

// Availability
RCT_EXTERN_METHOD(isAvailable:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

// Version
RCT_EXTERN_METHOD(getVersion:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

// Registration
RCT_EXTERN_METHOD(registerAppForAdNetworkAttribution:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

// Conversion Value (SKAN 3.0)
RCT_EXTERN_METHOD(updateConversionValue:(nonnull NSNumber *)value
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

// Postback Conversion Value (SKAN 4.0)
RCT_EXTERN_METHOD(updatePostbackConversionValue:(nonnull NSNumber *)value
                  coarseValue:(NSString * _Nullable)coarseValue
                  lockWindow:(NSNumber * _Nullable)lockWindow
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

// Impression Attribution (SKAN 4.0)
RCT_EXTERN_METHOD(startImpression:(NSString *)signature
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(endImpression:(NSString *)signature
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

// Current State
RCT_EXTERN_METHOD(getCurrentConversionValue:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

RCT_EXTERN_METHOD(getAttributionData:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)

@end
