//
//  MVMCoreTopAlertOperation.h
//  mobilefirst
//
//  Created by Scott Pfeil on 6/4/16.
//  Copyright © 2016 Verizon Wireless. All rights reserved.
//

#import <MVMCore/MVMCoreOperation.h>
#import <MVMCoreUI/MVMCoreTopAlertAnimationDelegateProtocol.h>

@class MVMCoreTopAlertObject;

@interface MVMCoreTopAlertOperation : MVMCoreOperation <MVMCoreTopAlertAnimationDelegateProtocol>

@property (readonly, getter=isPaused) BOOL paused;

/// A bool for if this top alert can be displayed. It is only ready if true.
@property (nonatomic, getter=isDisplayable) BOOL displayable;

@property (nonatomic) BOOL reAddAfterCancel;

@property (nonnull, nonatomic, strong) MVMCoreTopAlertObject *topAlertObject;

- (nullable instancetype)initWithTopAlertObject:(nonnull MVMCoreTopAlertObject *)topAlertObject;

/// Updates the operation with a new object
- (void)updateWithTopAlertObject:(nonnull MVMCoreTopAlertObject *)topAlertObject;

/// Updates the operation isDisplayable based on the page type.
- (void)updateDisplayableByPageType:(nullable NSString *)pageType;

// Pauses the operation. Temporarily removes any alert.
- (void)pause;

// Unpauses the operation, resuming any alert.
- (void)unpause;

@end
