//
//  MVMCoreUITopAlertView.h
//  myverizon
//
//  Created by Chris Yang on 2/3/16.
//  Copyright © 2016 Verizon Wireless. All rights reserved.
//

#import <UIKit/UIKit.h>
@import MVMCore.MVMCoreTopAlertAnimationDelegateProtocol;
@import MVMCore.MVMCoreLoadDelegateProtocol;
@import MVMCore.MVMCoreActionDelegateProtocol;
@import MVMCore.MVMCorePresentationDelegateProtocol;
@import MVMCore.MVMCoreTopAlertViewProtocol;
#import <MVMCoreUI/MFView.h>
#import <MVMCoreUI/ButtonDelegateProtocol.h>

@class MVMCoreTopAlertObject;
@class MVMCoreUITopAlertBaseView;

@interface MVMCoreUITopAlertView : MFView <MVMCoreTopAlertViewProtocol,MVMCoreLoadDelegateProtocol,MVMCoreActionDelegateProtocol,MVMCorePresentationDelegateProtocol,ButtonDelegateProtocol>

@property (nonatomic, readonly) UIStatusBarStyle statusBarStyle;

// Delegate for the top alert view
@property (nonatomic, nullable, weak) id <MVMCoreTopAlertAnimationDelegateProtocol> animationDelegate;

// Current top alert object
@property (strong, nullable, nonatomic) MVMCoreTopAlertObject *topAlertObject;

// Returns the top alert view
+ (nullable instancetype)sharedGlobal;

// Returns a TopAlertView with the mvm styling. Also sets the property in the session.
+ (nullable instancetype)setupTopAlertView;

// Pins the status bar view at the top of the passed in view controller.
- (void)pinATopViewController:(nonnull UIViewController *)viewController;

// For controlling the status bar view
- (void)expandStatusBarView;
- (void)collapseStatusBarView;

/// reset status bar background color, when backgroundColor is nil corresponding background color will be set based on style
- (void)resetDefaultBackgroundColor:(nullable UIColor *)backgroundColor basedOnStatusBarStyle:(UIStatusBarStyle)style;

// Can be subclassed for custom views.
- (nonnull MVMCoreUITopAlertBaseView *)topAlertViewForTopAlertObject:(nullable MVMCoreTopAlertObject *)topAlertObject animationDelegate:(nonnull id <MVMCoreTopAlertAnimationDelegateProtocol>)animationDelegate statusBarColor:(UIColor *_Nullable *_Nullable)statusBarColor;

// Get the background color based on the type
- (nonnull UIColor *)getBackgroundColorForType:(nullable NSString *)type;

// Set the status bar color. Used for updating the status bar when the view changes.
- (void)setStatusBarColor:(nullable UIColor *)statusBarColor statusBarStyle:(UIStatusBarStyle)style;

@end
