//
//  HomeModeMovementViewController.m
//  OneCable
//
//  Created by nComz on 2017. 4. 19..
//  Copyright © 2017년 ntels. All rights reserved.
//

#import "HomeModeMovementViewController.h"
#import "CustomLabel.h"
#import "CustomButton.h"
#import "CustomImageView.h"
#import "HomeModeSettingsViewController.h"

@interface HomeModeMovementViewController ()

@end

@implementation HomeModeMovementViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self initUI];
}

- (void)initUI {
    
    [self.navigationController.navigationBar setHidden:YES];
    self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}

- (IBAction)btnWakeupTouched:(id)sender {
    [self homeModeSet:HOME_MODE_MORNING];
}

- (IBAction)btnOutingTouched:(id)sender {
    [self homeModeSet:HOME_MODE_AWAY];
}

- (IBAction)btnComingTouched:(id)sender {
    [self homeModeSet:HOME_MODE_HOME];
}

- (IBAction)btnSleepTouched:(id)sender {
    [self homeModeSet:HOME_MODE_NIGHT];
}

- (void) homeModeSet:(NSString *)modeCode{
    
    HomeModeSettingsViewController *vc =[CommonUtil instantiateViewControllerWithIdentifier:@"HomeModeSettingsViewController" storyboardName:@"Main"];
    
    ModeModel *mode = [_modeArray objectKey:@"basicModeCode" eqaulToString:modeCode];
//    NSLog(@"Mode : %@", mode);
    vc.mode = mode;
    
    [self.navigationController pushViewController:vc animated:YES];
}

- (IBAction)btnCancelTouched:(id)sender {
    [[self navigationController] popToRootViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}

@end
