






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

@interface RequestViewController ()

@end

@implementation RequestViewController

- (UIButton *)lostRightButton
{
    if (!_lostRightButton) {
        _lostRightButton = [[UIButton alloc] init];
        [_lostRightButton setTitle:PintResting.findClickCat.burstThickOwnIncludingAfterNet forState:UIControlStateNormal];
        [_lostRightButton setTitleColor:[PintResting soloSmallColor] forState:UIControlStateNormal];
        [_lostRightButton addTarget:self action:@selector(buildFirstClickedBroadcastHowAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _lostRightButton;
}

- (UIButton *)skipAllUseButton
{
    if (!_skipAllUseButton) {
        _skipAllUseButton = [[UIButton alloc] init];
        [_skipAllUseButton setTitle:PintResting.findClickCat.minimalButtonsSockProvidesLiveStarting forState:UIControlStateNormal];
        [_skipAllUseButton setTitleColor:[PintResting soloSmallColor] forState:UIControlStateNormal];
        [_skipAllUseButton addTarget:self action:@selector(sensitiveReceiptSlidingEngineDidAction:) forControlEvents:UIControlEventTouchUpInside];
        _skipAllUseButton.hidden = [PintResting uppercaseMostAlignDisablingReaderExtract];
    }
    return _skipAllUseButton;
}

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

- (void)sensitiveReceiptSlidingEngineDidAction:(UIButton *)sender {
    [[IllBundleManager shared] hitPacketArmWindow];
    [PintResting sensitiveReceiptSlidingEngineDidAction];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    
    self.view.overrideUserInterfaceStyle = UIUserInterfaceStyleLight;
    self.view.layer.cornerRadius = PintResting.findClickCat.tomorrowCase;

    
    self.view.backgroundColor = [PintResting sheSequenceSunLocalTeluguColor];
    NSString *nonceBackwardsDomainsDogIteration = [PintResting pinDeliverInuitHyphenRemainderImage];
    if (nonceBackwardsDomainsDogIteration) {
        UIImageView *yetOwnLikeImageView = [[UIImageView alloc] init];
        yetOwnLikeImageView.contentMode = UIViewContentModeScaleAspectFill;
        yetOwnLikeImageView.clipsToBounds = YES;
        yetOwnLikeImageView.layer.cornerRadius = PintResting.findClickCat.tomorrowCase;
        yetOwnLikeImageView.layer.masksToBounds = YES;
        [yetOwnLikeImageView sd_setImageWithURL:[NSURL URLWithString:nonceBackwardsDomainsDogIteration]];
        [self.view insertSubview:yetOwnLikeImageView atIndex:0];
        [yetOwnLikeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.view);
        }];
        self.dismissWaistIronMolarRepliesImageView = yetOwnLikeImageView;
    }

    [self.view addSubview:self.lostRightButton];
    [self.view addSubview:self.skipAllUseButton];
    
    CGFloat lawSize = PintResting.findClickCat.advanceValue;
    [_lostRightButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.equalTo(self.view).offset(PintResting.findClickCat.airCapsSign);
        make.size.mas_equalTo(CGSizeMake(lawSize, lawSize));
    }];
    [_skipAllUseButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(PintResting.findClickCat.airCapsSign);
        make.right.equalTo(self.view).offset(-PintResting.findClickCat.airCapsSign);
        make.size.mas_equalTo(CGSizeMake(lawSize, lawSize));
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(acceptSedentaryGreekCutPointExpandFrame:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(funkMessagingReloadVerboseObservingUnfocused:) 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([PintResting punjabiBetterDraftWasContentsIdleSize]);
    }];
}


- (void)acceptSedentaryGreekCutPointExpandFrame:(NSNotification *)notification {
    
    CGFloat duration = [notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue];
    
    
    CGRect birthBedFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
    
    UIWindow *keyWindow = [IllBundleManager shared].masterFourthWindow;
    if (![keyWindow isMemberOfClass:NSClassFromString(PintResting.findClickCat.pendingSubCatPoolSheetIdentity)]) {
#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 mayRect = [keyWindow convertRect:firstResponder.frame fromView:firstResponder.superview];
            
            if ((mayRect.origin.y + mayRect.size.height) > birthBedFrame.origin.y) {
                CGFloat might = ((mayRect.origin.y + mayRect.size.height) - birthBedFrame.origin.y) + 10;
                
                eggWeek(self);
                [UIView animateWithDuration:duration animations:^{
                    queryBlue(self);
                    self.navigationController.view.transform = CGAffineTransformMakeTranslation(0, -might);
                }];
            }
        }
    }
}


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

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

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