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

#import <MVMCoreUI/MFProgrammaticTableViewController.h>
#import <MVMCoreUI/TopLabelsView.h>

@class PrimaryButton;


@interface TopLabelsAndBottomButtonsTableViewController : MFProgrammaticTableViewController

@property (nullable, weak, nonatomic) TopLabelsView *topLabelsView;
@property (nullable, weak, nonatomic) PrimaryButton *primaryButton;
@property (nullable, weak, nonatomic) PrimaryButton *secondaryButton;
@property (nullable, weak, nonatomic) UIView *viewInScroll;
@property (nullable, weak, nonatomic) UIView *viewOutOfScroll;
@property (nullable, strong, nonatomic) UIView *bottomView;
@property (nullable, strong, nonatomic) UIView *safeAreaView;
@property (nullable, strong, nonatomic) UIView *tableFooterAccessoryView;


// Can override. This is put in because to cover 90% of the screens for initial ipad release, need to rebuild ui (newDataBuildScreen) of size of view change in updateViews. Disable this to handle manually with more finess.
@property (nonatomic) BOOL rebuildUIOnSizeChange;

// For manually showing and hiding top or bottom view. Most likely not needed. May be useful for if a header is not there but then appears under certain conditions.
- (void)showHeader;
- (void)hideHeader;
- (void)showFooter;
- (void)hideFooter;

// showing/hiding left and right primary buttons
- (void)setPrimaryLeftButtonHidden:(BOOL)left rightButtonHidden:(BOOL)right;

#pragma mark - Subclass
//*********
// Can overwrite the default padding below top view or above middle view(between view)
- (nonnull NSNumber *)spaceAboveBetweenView;
// If both are subclassed to return NO, then the buttons will not be pinned towards the bottom because neither spacing would try to fill the screen. Below top is default NO, above bottom is default YES.
- (BOOL)spaceBelowTopViewSetToFill;
- (BOOL)spaceAboveBottomViewSetToFill;

// Can overwrite the default padding for labels and buttons.
- (UIEdgeInsets)paddingForTopLabels;
- (UIEdgeInsets)paddingForBottomButtons;

// default button map will automatically get from response, or you can set these to have your own button map used.
- (nullable NSDictionary *)secondaryButtonMap;
- (nullable NSDictionary *)primaryButtonMap;

//populate the footer accerssory view
- (nonnull NSArray <UIView *>*)populateHeaderAccessoryView;
//populate the footer accerssory view
- (nonnull NSArray <UIView *>*)populateFooterAccessoryView;

// The space between objects for the footer accessory.
- (UIEdgeInsets)spaceAroundUIObject:(nullable id)object;

// Should not sub class it, for most cases, the headline and message will be in page map, but who knows how server wants to send them in certain pages
- (nullable NSDictionary *)mapForTopLabels;

// Use these if you want to replace the top labels or bottom button views with your own views.
- (nullable UIView *)useCustomViewInsteadOfLabels;
- (nullable UIView *)useCustomViewInsteadOfButtons;

// Can override if the buttons should be outside of the scroll or not. Default is no.
- (BOOL)bottomViewOutsideOfScroll;
//override for setting attributed headline and message
-(void)setHeadlineAndMessage;
@end
