






#import "HostHueViewController.h"

@interface HostHueViewController ()

@end

@implementation HostHueViewController

- (UIButton *)winSampleButton
{
    if (!_winSampleButton) {
        _winSampleButton = [[UIButton alloc] init];
        [_winSampleButton setTitle:UserArtRoot.wayAbortLove.topBloodResumeInheritedPenCookies forState:UIControlStateNormal];
        [_winSampleButton setTitleColor:[UserArtRoot telephonyColor] forState:UIControlStateNormal];
        [_winSampleButton addTarget:self action:@selector(snapBadTempStrengthOddAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _winSampleButton;
}

- (UIButton *)tabTreeBagButton
{
    if (!_tabTreeBagButton) {
        _tabTreeBagButton = [[UIButton alloc] init];
        [_tabTreeBagButton setTitle:UserArtRoot.wayAbortLove.bezelClampIntroWinSimulatesMight forState:UIControlStateNormal];
        [_tabTreeBagButton setTitleColor:[UserArtRoot telephonyColor] forState:UIControlStateNormal];
        [_tabTreeBagButton addTarget:self action:@selector(mandatoryDescribesHailLocalOneAction:) forControlEvents:UIControlEventTouchUpInside];
        _tabTreeBagButton.hidden = [UserArtRoot leapSpacingUptimeAskTooNotice];
    }
    return _tabTreeBagButton;
}

- (void)snapBadTempStrengthOddAction:(UIButton *)sender {
    if(self.navigationController.viewControllers.count > 1) {
        [self.view endEditing:YES];
        [self.navigationController popViewControllerAnimated:NO];
    }else {
        [self mandatoryDescribesHailLocalOneAction:sender];
        [self dismissViewControllerAnimated:NO completion:nil];
    }
}

- (void)mandatoryDescribesHailLocalOneAction:(UIButton *)sender {
    [[MatchMenuManager shared] sunRenderHueWindow];
    [UserArtRoot mandatoryDescribesHailLocalOneAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = 2;
    self.view.backgroundColor = [UserArtRoot resultQualityGenericsBestCutColor];
    [self.view addSubview:self.winSampleButton];
    [self.view addSubview:self.tabTreeBagButton];
    
    CGFloat theSize = UserArtRoot.wayAbortLove.satisfiedWon;
    [_winSampleButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(UserArtRoot.wayAbortLove.hueSpineKit);
        make.size.mas_equalTo(CGSizeMake(theSize, theSize));
    }];
    [_tabTreeBagButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(UserArtRoot.wayAbortLove.hueSpineKit);
        make.right.equalTo(self.view).offset(-UserArtRoot.wayAbortLove.hueSpineKit);
        make.size.mas_equalTo(CGSizeMake(theSize, theSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(episodeTallSimulatesHashRemoveDecimalFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(targetAcrossFarthestRecorderPurposeChatter:) name:UIKeyboardWillHideNotification object:nil];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self.view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo([UserArtRoot photosMonotonicAlbumIntentWrappersWrapSize]);
    }];
}


- (void)episodeTallSimulatesHashRemoveDecimalFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect sixAllowFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [MatchMenuManager shared].teacherDepthWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(UserArtRoot.wayAbortLove.signalKazakhChlorideAlphabetSleepFirst)]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        UIView *firstResponder = [keyWindow performSelector:@selector(firstResponder)];
#pragma clang diagnostic pop
        
        if (firstResponder  && [firstResponder isKindOfClass:UITextField.class]) {

            CGRect runRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((runRect.origin.y + runRect.size.height) > sixAllowFrame.origin.y) {
                CGFloat malay = ((runRect.origin.y + runRect.size.height) - sixAllowFrame.origin.y) + 10;
                
                overdue(self);
                [UIView animateWithDuration:duration animations:^{
                    thumbMask(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -malay);
                }];
            }
        }
    }
}


- (void)targetAcrossFarthestRecorderPurposeChatter:(NSNotification *)notification{
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    overdue(self);
    [UIView animateWithDuration:duration animations:^{
        thumbMask(self);
        self.navigationController.view.transform = CGAffineTransformIdentity;
    }];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [super touchesEnded:touches withEvent:event];
    [self.view endEditing:YES];
}

- (void)sortingMolarFatalWorkListeners:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self.view endEditing:YES];
}

- (void)dealloc {
    
    [self.view endEditing:YES];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
}

@end
