//
//  SCAdConfiguration.h
//  SmartclipSDKiOS
//
//  Copyright © 2018 smartclip. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>

NS_ASSUME_NONNULL_BEGIN

@class SCAdEnvironment, SCAdVariants, UIColor;

/// enum that defines different ways a clickThrough can be implemented
/// currently ClickableOnFullArea and ClickableOnAssociatedButtonOrLink are handled in the same way,
/// by directly opening the landingpage, whereas
/// ClickableWithConfirmationDialog opens a dialog, which can be configured when
/// "customizableClickThroughAlert" is set to true
typedef enum SCClickType {
    NotClickable,
    ClickableOnFullArea,
    ClickableOnAssociatedButtonOrLink,
    ClickableWithConfirmationDialog
} SCClickType;

/**
 * This class is used for configuring the advertisement behavior
 */
@interface SCAdConfiguration : NSObject
/// The request url for you advertisement content
@property (nonatomic, copy) NSString* _Nullable adURL;
/// BundleId of the app
@property (nonatomic, copy) NSString* _Nullable bundleId;
/// Use this to enable bitrate calculation, or set desiredBitrate
@property (nonatomic, strong) SCAdEnvironment* _Nullable environment;
/// If you use opener, closer or bumper, SCAdVariants is the place to define them
@property (nonatomic, strong) SCAdVariants* _Nullable  variants;
/// Use this property to specify a custom title for the ad.
@property (nonatomic, copy) NSString* _Nullable customTitle;
/// Use this property to specify a custom title color for the ad.
@property (nonatomic, strong) UIColor* _Nullable customTitleColor;
/// Use this property to specify a custom progress bar color for the ad.
@property (nonatomic, strong) UIColor* _Nullable customProgressBarColor;
/// You can prevent ad skipping with this boolean value, defaults to true
@property (nonatomic)         BOOL     allowAdSkipping;
/// You can define an offset value, when you want to allow ad skipping (defaults to -1, meaning never)
@property (nonatomic)         NSInteger skipOffset;
/// `true` if the audio of the advertisement should be muted from the beginning. Defaulting to `false`.
@property (nonatomic)         BOOL      initialMuted;
/// message to be displayed on the clickThrough dialog (default: "Open in Browser?")
@property (nonatomic, copy) NSString* _Nonnull clickThroughDialogMessage;
/// string to be displayed on the clickThrough dialog`s positive answer button (default: "YES")
@property (nonatomic, copy) NSString* _Nonnull clickThroughPositiveAnswer;
/// string to be displayed on the clickThrough dialog`s negative answer button (default: "NO")
@property (nonatomic, copy) NSString* _Nonnull clickThroughNegativeAnswer;
/// clickType for clickThrough handling (default: ClickableWithConfirmationDialog)
@property (nonatomic) enum SCClickType  clickType;
/// if you want to have control over the UIAlertController during clickThrough set this to "YES" (and leave clickType on default)
@property (nonatomic) BOOL customizableClickThroughAlert;
/// name of the image asset used for the replay button (outstream only)
@property (nonatomic, copy) NSString* _Nullable replayButtonImageName;

/// use this function to set the verificationVendors whitelist
/// if not set, all vendors are added to the whitelist
- (void)setOMIDVerificationVendorWhitelist:(NSArray*)vendors;

/// Default configuration initialized with the given SCAdEnvironment values
+ (SCAdConfiguration*)defaultConfigurationWith:(NSString*)requestURL variants:(SCAdVariants*)variants environment:(SCAdEnvironment*)environment;
/// defaultInstreamConfiguration for use with sequencer
+ (SCAdConfiguration*)defaultInstreamConfigurationWith:(SCAdEnvironment*)environment;
///SpotXSDK version string
+ (NSString*)sdkVersionString;
///OMIDSDK version string
+ (NSString*)omidSDKVersionString;
@end

NS_ASSUME_NONNULL_END
