//
//  HomeHubUpdateGuideViewController.m
//  OneCable
//
//  Created by nComz on 2017. 5. 11..
//  Copyright © 2017년 ntels. All rights reserved.
//

#import "HomeHubUpdateGuideViewController.h"
#import "HomeHubUpdateStartViewController.h"

@interface HomeHubUpdateGuideViewController ()

@end

@implementation HomeHubUpdateGuideViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
    statusBar.backgroundColor = [UIColor whiteColor];
    
    [self.navigationController.navigationBar setHidden:YES];
    self.navigationController.interactivePopGestureRecognizer.enabled = NO;
}

- (void)operationComplite {
    
    NSLog(@"update guide operation complite");
    
    if (_closeWhenOperationComplite) 
        [self btnCancelTouched:nil];
    
}

- (IBAction)btnConfirmTouched:(id)sender {
    
    HomeHubUpdateStartViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"HomeHubUpdateStartViewController" storyboardName:@"HomeHub"];
    vc.updateType = _updateType;
    vc.hubInfo = _hubInfo;
    
    [self.navigationController pushViewController:vc animated:YES];
    
}

- (IBAction)btnCancelTouched:(id)sender {
    
    if (_closeWhenOperationComplite)
        [self dismissViewControllerAnimated:YES completion:nil];
    else
         [self.navigationController popViewControllerAnimated:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}
@end
