






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

@interface ArchiveViewController ()

@end

@implementation ArchiveViewController

- (UIButton *)stayPaperButton
{
    if (!_stayPaperButton) {
        _stayPaperButton = [[UIButton alloc] init];
        [_stayPaperButton setTitle:IndicesBest.trustMainArm.acquireTapNoteHomeEqualMagnetic forState:UIControlStateNormal];
        [_stayPaperButton setTitleColor:[IndicesBest designWinColor] forState:UIControlStateNormal];
        [_stayPaperButton addTarget:self action:@selector(passiveCocoaSubRoleCurlAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _stayPaperButton;
}

- (UIButton *)napEyeCityButton
{
    if (!_napEyeCityButton) {
        _napEyeCityButton = [[UIButton alloc] init];
        [_napEyeCityButton setTitle:IndicesBest.trustMainArm.manMustMaterialExtraGoogleSparse forState:UIControlStateNormal];
        [_napEyeCityButton setTitleColor:[IndicesBest designWinColor] forState:UIControlStateNormal];
        [_napEyeCityButton addTarget:self action:@selector(pieceMergeGermanSortBoldAction:) forControlEvents:UIControlEventTouchUpInside];
        _napEyeCityButton.hidden = [IndicesBest watchSubstringReorderAmbientSubEntered];
    }
    return _napEyeCityButton;
}

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

- (void)pieceMergeGermanSortBoldAction:(UIButton *)sender {
    [[AssumeNotManager shared] eraFoodSlideWindow];
    [IndicesBest pieceMergeGermanSortBoldAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = IndicesBest.trustMainArm.notHexIndigo;

    
    self.view.backgroundColor = [IndicesBest managerCollectedAngularYouAdvisoryColor];
    NSString *endSlovakCanonicalSupportsDropped = [IndicesBest intentBoundaryBitsServiceDolbyImage];
    if (endSlovakCanonicalSupportsDropped) {
        UIImageView *sonScalingImageView = [[UIImageView alloc] init];
        sonScalingImageView.contentMode = UIViewContentModeScaleAspectFill;
        sonScalingImageView.clipsToBounds = YES;
        sonScalingImageView.layer.cornerRadius = IndicesBest.trustMainArm.notHexIndigo;
        sonScalingImageView.layer.masksToBounds = YES;
        [sonScalingImageView sd_setImageWithURL:[NSURL URLWithString:endSlovakCanonicalSupportsDropped]];
        [self.view insertSubview:sonScalingImageView atIndex:0];
        [sonScalingImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.postBrokenTransposeDragFigureImageView = sonScalingImageView;
    }

    [self.view addSubview:self.stayPaperButton];
    [self.view addSubview:self.napEyeCityButton];
    
    CGFloat midSize = IndicesBest.trustMainArm.hexYouJabber;
    [_stayPaperButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(IndicesBest.trustMainArm.bodyThermal);
        make.size.mas_equalTo(CGSizeMake(midSize, midSize));
    }];
    [_napEyeCityButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(IndicesBest.trustMainArm.bodyThermal);
        make.right.equalTo(self.view).offset(-IndicesBest.trustMainArm.bodyThermal);
        make.size.mas_equalTo(CGSizeMake(midSize, midSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sliceAddYetRealmWithSpaFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(logSupplyPriceFootUseInteger:) 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([IndicesBest fathomsCombinedRefusedHisExclusionGoldenSize]);
    }];
}


- (void)sliceAddYetRealmWithSpaFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect saveCityFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [AssumeNotManager shared].headsetEarlyWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(IndicesBest.trustMainArm.rankKitCopperAffinityItsNotifies)]) {
#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 oneRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((oneRect.origin.y + oneRect.size.height) > saveCityFrame.origin.y) {
                CGFloat pinch = ((oneRect.origin.y + oneRect.size.height) - saveCityFrame.origin.y) + 10;
                
                wayZoom(self);
                [UIView animateWithDuration:duration animations:^{
                    cocoaMenu(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -pinch);
                }];
            }
        }
    }
}


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

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

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