






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

@interface ClearedViewController ()

@end

@implementation ClearedViewController

- (UIButton *)peopleRedButton
{
    if (!_peopleRedButton) {
        _peopleRedButton = [[UIButton alloc] init];
        [_peopleRedButton setTitle:CupDenyLeap.rarePutOther.diamondRenewAnotherTildeTagsMagenta forState:UIControlStateNormal];
        [_peopleRedButton setTitleColor:[CupDenyLeap eightYardColor] forState:UIControlStateNormal];
        [_peopleRedButton addTarget:self action:@selector(routeMembersBadTemporalRevisionAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _peopleRedButton;
}

- (UIButton *)reportsHasButton
{
    if (!_reportsHasButton) {
        _reportsHasButton = [[UIButton alloc] init];
        [_reportsHasButton setTitle:CupDenyLeap.rarePutOther.useSeedConstantLeakyAffinityWidget forState:UIControlStateNormal];
        [_reportsHasButton setTitleColor:[CupDenyLeap eightYardColor] forState:UIControlStateNormal];
        [_reportsHasButton addTarget:self action:@selector(reminderImmutableBusTabBagAction:) forControlEvents:UIControlEventTouchUpInside];
        _reportsHasButton.hidden = [CupDenyLeap periodWhoMetadataDisableAssistantLimited];
    }
    return _reportsHasButton;
}

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

- (void)reminderImmutableBusTabBagAction:(UIButton *)sender {
    [[CutStringManager shared] anyRedUplinkWindow];
    [CupDenyLeap reminderImmutableBusTabBagAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = CupDenyLeap.rarePutOther.runCondensed;

    
    self.view.backgroundColor = [CupDenyLeap popoverEmailMergeEchoSolidColor];
    NSString *ejectWayPublicPlaceTake = [CupDenyLeap showSwapFractionRecycleRationalImage];
    if (ejectWayPublicPlaceTake) {
        UIImageView *netArmUsedImageView = [[UIImageView alloc] init];
        netArmUsedImageView.contentMode = UIViewContentModeScaleAspectFill;
        netArmUsedImageView.clipsToBounds = YES;
        netArmUsedImageView.layer.cornerRadius = CupDenyLeap.rarePutOther.runCondensed;
        netArmUsedImageView.layer.masksToBounds = YES;
        [netArmUsedImageView sd_setImageWithURL:[NSURL URLWithString:ejectWayPublicPlaceTake]];
        [self.view insertSubview:netArmUsedImageView atIndex:0];
        [netArmUsedImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.swappedBrandEndBayerComputerImageView = netArmUsedImageView;
    }

    [self.view addSubview:self.peopleRedButton];
    [self.view addSubview:self.reportsHasButton];
    
    CGFloat bagSize = CupDenyLeap.rarePutOther.producesGasp;
    [_peopleRedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(CupDenyLeap.rarePutOther.eyeRestFill);
        make.size.mas_equalTo(CGSizeMake(bagSize, bagSize));
    }];
    [_reportsHasButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(CupDenyLeap.rarePutOther.eyeRestFill);
        make.right.equalTo(self.view).offset(-CupDenyLeap.rarePutOther.eyeRestFill);
        make.size.mas_equalTo(CGSizeMake(bagSize, bagSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(heightChunkySecondaryOpaqueAdvanceSpouseFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(vendorPermanentTwentyRetIndianLead:) 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([CupDenyLeap textureSemanticsSubmitUnderGrantingSlantSize]);
    }];
}


- (void)heightChunkySecondaryOpaqueAdvanceSpouseFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect contactsFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [CutStringManager shared].wetEarlyCropWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(CupDenyLeap.rarePutOther.calculateBagDeltaOfferGreekUndone)]) {
#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 ageRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((ageRect.origin.y + ageRect.size.height) > contactsFrame.origin.y) {
                CGFloat focal = ((ageRect.origin.y + ageRect.size.height) - contactsFrame.origin.y) + 10;
                
                justWay(self);
                [UIView animateWithDuration:duration animations:^{
                    uploadCan(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -focal);
                }];
            }
        }
    }
}


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

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

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