//
//  RDSResetDeviceVC.m
//  Temperature
//
//  Created by RD on 2023/1/10.
//

#import "RDSResetDeviceVC.h"
#import "RDSAddRoomVC.h"

@interface RDSResetDeviceVC ()
@property (weak, nonatomic) IBOutlet UILabel *lab1;
@property (weak, nonatomic) IBOutlet UILabel *lab2;
@property (weak, nonatomic) IBOutlet UIImageView *imgView1;
@property (weak, nonatomic) IBOutlet UIImageView *imgView2;

@end

@implementation RDSResetDeviceVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"添加房间";
    
//    if(TheDataManager.rooms.count == 0){
    switch (self.deviceTypeModel.deviceType) {
        case RDSDeviceType_MasterController: {
            // 添加主控
            _lab1.text = @"1、主控制器开机状态下，长按『菜单键』3s进入设置界面";
            _lab2.text = @"2、再次长按『菜单键』，直到显示配网二维码";
            _imgView1.image = [UIImage imageNamed:@"img_reset_1"];
            _imgView2.image = [UIImage imageNamed:@"img_reset_2"];
            break;
        }
        case RDSDeviceType_SubController: {
            // 添加分控
            _lab1.text = @"1、分控制器开机状态下，长按『菜单键』3s直到界面出现配网二维码";
            _lab2.text = @"2、使用APP扫码绑定";
            _imgView1.image = [UIImage imageNamed:@"img_reset_3"];
            _imgView2.image = [UIImage imageNamed:@"img_reset_4"];
            break;
        }
        case RDSDeviceType_IntelligentWaterCollector: {
            // 添加集分水器
            _lab1.text = @"1、永续精灵通电状态下，长按5秒钟，语音提示：进入配网状态 ，蓝色灯为快闪状态";
            _lab2.text = @"2、将手机靠近设备开始配网";
            _imgView1.image = [UIImage imageNamed:@"img_reset_1"];
            _imgView2.image = [UIImage imageNamed:@"img_reset_2"];
            break;
        }
        case RDSDeviceType_YongXuSpirit: {
            // 添加永续精灵
            _lab1.text = @"1、永续精灵通电状态下，长按5秒钟，语音提示：开始蓝牙配网 ，蓝色灯为快闪状态";
            _lab2.text = @"2、将手机靠近设备开始配网";
            _imgView1.image = [UIImage imageNamed:@"image_reset_5"];
            _imgView2.image = [UIImage imageNamed:@"image_reset_5"];
            break;
        }
        default:
            break;
    }
}


- (IBAction)onNextBtnClick {
    
    RDSAddRoomVC *vc = [[RDSAddRoomVC alloc] init];
    vc.deviceTypeModel = self.deviceTypeModel;
    [self pushViewController:vc animated:YES];
    
}

@end
