//
//  CommandClassControlNodeView.h
//  kneet2
//
//  Created by Jason Lee on 11/5/15.
//  Copyright © 2015 ntels. All rights reserved.
//

#import "JDObject.h"

@class ItemSubModel;

@class CustomButton;
@class CustomLabel;

@interface CommandClassControlNodeView : UIView {
    
@protected
    __weak ItemSubModel *_subItem;
    __weak CmdClsValueModel *_selectedCmdClsValue;
    NSString *_cmdClsValue;
}

@property (weak, nonatomic) ItemSubModel *subItem;
@property (weak, nonatomic) CmdClsValueModel *selectedCmdClsValue;

+ (CommandClassControlNodeView *)viewForCommandClass:(CmdClsType)cmdClsType;

@end

@interface CommandClassControlNodeSensorBinaryView : CommandClassControlNodeView

@end

@interface CommandClassControlNodeSensorMultiLevelView : CommandClassControlNodeView


@end

@interface CommandClassControlNodeValveView : CommandClassControlNodeView

@property (weak, nonatomic) IBOutlet CustomButton *btnOpen;
@property (weak, nonatomic) IBOutlet CustomButton *btnClose;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintBtnOpenWidth;

- (IBAction)btnOpenTouched:(id)sender;
- (IBAction)btnCloseTouched:(id)sender;

@end

@interface CommandClassControlNodeSwitchBinaryView : CommandClassControlNodeView

@property (weak, nonatomic) IBOutlet CustomButton *btnOn;
@property (weak, nonatomic) IBOutlet CustomButton *btnOff;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintBtnOnWidth;

- (IBAction)btnOnTouched:(id)sender;
- (IBAction)btnOffTouched:(id)sender;

@end

@interface CommandClassControlNodeSwitchMultiLevelView : CommandClassControlNodeView

@end