//
//  MVMCoreUICheckBox.h
//  myverizon
//
//  Created by Suresh, Kamlesh on 11/25/15.
//  Copyright © 2015 Verizon Wireless. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MVMCoreUI/MFView.h>
#import <MVMCoreUI/MVMCoreUICheckMarkView.h>
@class Label;
@class MFSizeObject;

@interface MVMCoreUICheckBox : UIControl <MVMCoreViewProtocol>

@property (nullable, weak, nonatomic) MVMCoreUICheckMarkView *checkMark;
@property (readonly, nonatomic) BOOL isSelected;
@property (nullable, strong, nonatomic) MFSizeObject *sizeObject;

//??????
@property (nullable, strong, nonatomic) UIColor *checkedColor;
@property (nullable, strong, nonatomic) UIColor *unCheckedColor;

// Label to the right of the check box.
@property (nullable, weak, nonatomic) Label *descriptionLabel;

// Setter for the descriptionLabel.text. Also sets the accessibility text.
@property (nullable, strong, nonatomic) NSString *descriptionText;
@property (nullable, strong, nonatomic) NSAttributedString *descriptionAttributedText;

// A block that is called when the switch is selected.
@property (nullable, copy, nonatomic) void (^switchSelected)(BOOL selected);

//convenient method to get a check box
+ (nullable instancetype)mfCheckBox;
+ (nullable instancetype)mfCheckBoxWithCheckedColor:(nullable UIColor *)checkedColor unCheckColor:(nullable UIColor *)unCheckedColor text:(nullable NSString *)text;
+ (nullable instancetype)mfCheckBoxWithCheckedColor:(nullable UIColor *)checkedColor unCheckColor:(nullable UIColor *)unCheckedColor atributedText:(nullable NSAttributedString *)attributedText;
//Check mark with rounded rect (Prepay - corner radius = 5)
+ (nullable instancetype)mfCheckBoxWithRoundedRect;

// convenient init
- (nullable instancetype)initWithCheckedColor:(nullable UIColor *)checkedColor unCheckColor:(nullable UIColor *)unCheckedColor text:(nullable NSString *)text;
- (nullable instancetype)initWithCheckedColor:(nullable UIColor *)checkedColor unCheckColor:(nullable UIColor *)unCheckedColor attributedText:(nullable NSAttributedString *)attributedText;
- (nullable instancetype)initWithCheckMarkView:(nullable MVMCoreUICheckMarkView *)checkMarkView checkedColor:(nullable UIColor *)checkedColor unCheckColor:(nullable UIColor *)unCheckedColor text:(nullable NSString *)text;
- (nullable instancetype)initWithCheckMarkView:(nullable MVMCoreUICheckMarkView *)checkMarkView checkedColor:(nullable UIColor *)checkedColor unCheckColor:(nullable UIColor *)unCheckedColor attributedText:(nullable NSAttributedString *)attributedText;

//configures
- (void)setSelected:(BOOL)selected;
- (void)setSelected:(BOOL)selected animated:(BOOL)animated;
- (void)setSelected:(BOOL)selected animated:(BOOL)animated runBlock:(BOOL)runBlock;
- (void)setColor:(nullable UIColor *)color forState:(UIControlState)state;
- (void)setCheckBoxBorder:(nullable UIColor *)color;

// helper
- (void)enable:(BOOL)enable;

//accessibility
- (void)setValueForAccessibilityText:(nullable NSString *)text;
- (void)hideDescriptionLabelAndPinCheckboxToRight;

@end
