//
//  UIButton+Custom.h
//  myverizon
//
//  Created by kamlesh on 1/8/15.
//  Copyright (c) 2015 Verizon Wireless. All rights reserved.
//

#import <UIKit/UIKit.h>
@import MVMCore.MVMCoreActionDelegateProtocol;
#import <MVMCoreUI/ButtonDelegateProtocol.h>
#import <MVMCoreUI/MFButtonProtocol.h>
#import <MVMCoreUI/MVMCoreUIMoleculeViewProtocol.h>
@class DelegateObject;

typedef void (^ButtonTapBlock)(id _Nonnull sender);

extern CGFloat const CloseButtonHeight;
extern CGFloat const CloseButtonWidth;

@interface MFCustomButton : UIButton <MFButtonProtocol>

@property (nullable, nonatomic, strong) NSDictionary *actionMap;
@property (nullable, nonatomic, weak) id <ButtonDelegateProtocol> buttonDelegate;
@property (nullable, nonatomic, strong) NSLayoutConstraint *heightConstraint;

// Adds a block to a button so it calls the block when pressed.
- (void)addBlock:(nonnull ButtonTapBlock)buttonTapBlock forControlEvents:(UIControlEvents)event;

// Sets up the button with the passed in action map. Will set the title and set the action to use the action handler.
- (void)setWithActionMap:(nullable NSDictionary *)actionMap delegateObject:(nullable DelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData;

//accessibility
- (void)addAccessibilityForCameraControl;

- (nonnull UIAccessibilityCustomAction *)accessibilityCustomAction;

#pragma mark - Deprecated

// Sets up the button with the passed in action map. Will set the title and set the action to use the action handler.
- (void)setWithActionMap:(nullable NSDictionary *)actionMap delegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)delegate additionalData:(nullable NSDictionary *)additionalData __deprecated;

// Sets up the button with the passed in action map. Will set the title and set the action to use the action handler. Also pass in the button delegate
- (void)setWithActionMap:(nullable NSDictionary *)actionMap actionDelegate:(nullable NSObject <MVMCoreActionDelegateProtocol>*)actionDelegate additionalData:(nullable NSDictionary *)additionalData buttonDelegate:(nullable id <ButtonDelegateProtocol>)buttonDelegate __deprecated;

@end
