






#import "LoveMidViewController.h"
#import "UIImageView+WebCache.h"

@interface LoveMidViewController ()

@end

@implementation LoveMidViewController

- (UIButton *)quoteRateButton
{
    if (!_quoteRateButton) {
        _quoteRateButton = [[UIButton alloc] init];
        [_quoteRateButton setTitle:LearnWeekly.reuseRenewal.serbianGoogleWideDescendErrorTriple forState:UIControlStateNormal];
        [_quoteRateButton setTitleColor:[LearnWeekly uptimeIcyColor] forState:UIControlStateNormal];
        [_quoteRateButton addTarget:self action:@selector(bondRelevanceBurstAssertFarAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _quoteRateButton;
}

- (UIButton *)halfSixOwnButton
{
    if (!_halfSixOwnButton) {
        _halfSixOwnButton = [[UIButton alloc] init];
        [_halfSixOwnButton setTitle:LearnWeekly.reuseRenewal.chatCascadeAbsentAlignmentValidityMinor forState:UIControlStateNormal];
        [_halfSixOwnButton setTitleColor:[LearnWeekly uptimeIcyColor] forState:UIControlStateNormal];
        [_halfSixOwnButton addTarget:self action:@selector(semicolonThemeReadableCapOverageAction:) forControlEvents:UIControlEventTouchUpInside];
        _halfSixOwnButton.hidden = [LearnWeekly presetEphemeralFollowChangingRetriedWritten];
    }
    return _halfSixOwnButton;
}

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

- (void)semicolonThemeReadableCapOverageAction:(UIButton *)sender {
    [[HockeySeeManager shared] introWrapItsWindow];
    [LearnWeekly semicolonThemeReadableCapOverageAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = LearnWeekly.reuseRenewal.fatExpectDue;

    
    self.view.backgroundColor = [LearnWeekly cutFragmentsProvidePinResumedColor];
    NSString *promptInterInferiorsHitRanked = [LearnWeekly drivenRangingFloorKilogramLeadImage];
    if (promptInterInferiorsHitRanked) {
        UIImageView *farUndoYetImageView = [[UIImageView alloc] init];
        farUndoYetImageView.contentMode = UIViewContentModeScaleAspectFill;
        farUndoYetImageView.clipsToBounds = YES;
        farUndoYetImageView.layer.cornerRadius = LearnWeekly.reuseRenewal.fatExpectDue;
        farUndoYetImageView.layer.masksToBounds = YES;
        [farUndoYetImageView sd_setImageWithURL:[NSURL URLWithString:promptInterInferiorsHitRanked]];
        [self.view insertSubview:farUndoYetImageView atIndex:0];
        [farUndoYetImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.hockeyTabBagEllipsisIdleImageView = farUndoYetImageView;
    }

    [self.view addSubview:self.quoteRateButton];
    [self.view addSubview:self.halfSixOwnButton];
    
    CGFloat waxSize = LearnWeekly.reuseRenewal.catDropWaist;
    [_quoteRateButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(LearnWeekly.reuseRenewal.burstVolume);
        make.size.mas_equalTo(CGSizeMake(waxSize, waxSize));
    }];
    [_halfSixOwnButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(LearnWeekly.reuseRenewal.burstVolume);
        make.right.equalTo(self.view).offset(-LearnWeekly.reuseRenewal.burstVolume);
        make.size.mas_equalTo(CGSizeMake(waxSize, waxSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(europeanIcySpouseForbiddenBlindingMayFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(insertDebuggingIntroSubmitDitherClaim:) 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([LearnWeekly keyTrialRetryDismissConcertSingleSize]);
    }];
}


- (void)europeanIcySpouseForbiddenBlindingMayFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect sizeBlobFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [HockeySeeManager shared].teamReturnedWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(LearnWeekly.reuseRenewal.extensionHexDogBoldfaceErrorExceeds)]) {
#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 eggRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((eggRect.origin.y + eggRect.size.height) > sizeBlobFrame.origin.y) {
                CGFloat proxy = ((eggRect.origin.y + eggRect.size.height) - sizeBlobFrame.origin.y) + 10;
                
                logRole(self);
                [UIView animateWithDuration:duration animations:^{
                    inferPink(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -proxy);
                }];
            }
        }
    }
}


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

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

- (void)printerRearGenericsDelaySpeak:(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
