//
//  MVMCoreAlertDelegateProtocol.h
//  mobilefirst
//
//  Created by Pfeil, Scott Robert on 8/8/17.
//  Copyright © 2017 Verizon Wireless. All rights reserved.
//
//  Called for popup style alerts.

#import <Foundation/Foundation.h>
@class MVMCoreAlertObject;
@class MVMCoreLoadObject;
@class MVMCoreErrorObject;

@protocol MVMCoreAlertDelegateProtocol

@optional

// helps tracking alert state
- (nullable NSDictionary *)additionalAlertDataToTrackForAlertWithObject:(nullable MVMCoreAlertObject *)alertObject;

// All are performed on the main thread.
- (void)alertShown:(nonnull UIAlertController *)alertController;
- (void)alertCancelled:(nonnull UIAlertController *)alertController;
- (void)alertDismissed:(nonnull UIAlertController *)alertController;
- (void)alertPaused:(nonnull UIAlertController *)alertController;
- (void)alertUnpaused:(nonnull UIAlertController *)alertController;

/** Get the alert object whose data will be presented. Overwrite this to alter how you want the alert to show.
 *  @param loadObject               The load object.
 *  @param errorObject              An error object if there was an error.
 *  @return                         Returns the alert object.
 *  Details: Gets the alert that will display to the screen. Easier to subclass here to avoid subclassing the displaying logic. */
- (nullable MVMCoreAlertObject *)alertObjectToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)errorObject;

@end
