//
//  MVMSwitch.h
//  myverizon
//
//  Created by Tianhang Yang on 12/1/15.
//  Copyright © 2015 Verizon Wireless. All rights reserved.
//


#import <UIKit/UIKit.h>
@import MVMCore.MVMCoreViewProtocol;
typedef void(^ValueChangeBlock)(void);

@interface MVMCoreUISwitch : UIControl <MVMCoreViewProtocol>

@property (assign, nonatomic, getter=isOn) BOOL on;
@property (nullable, strong, nonatomic) UIColor *onTintColor;
@property (nullable, strong, nonatomic) UIColor *offTintColor;

@property (nullable, strong, nonatomic) UIColor *onKnobTintColor;
@property (nullable, strong, nonatomic) UIColor *offKnobTintColor;

@property (nonatomic) BOOL shouldTouchToSwitch;
@property (nullable, copy, nonatomic) ValueChangeBlock valueChangedBlock;

+ (nullable instancetype)mvmSwitchDefault;
+ (nullable instancetype)mvmSwitchDefaultWithValueChangeBlock:(nullable ValueChangeBlock)block;

- (void)setState:(BOOL)state animated:(BOOL)animated;

// Sets the state without triggering the value changed block.
- (void)setState:(BOOL)stateWithoutBlock withoutBlockAnimated:(BOOL)animated;

+ (CGFloat)getSwitchHeight;

@end
