






#import "NeverGradeViewController.h"
#import "FactBasicManager.h"
#import "ExistentView.h"
#import "UIColor+PenColor.h"
#import "UIDevice+SonDevice.h"
#import "UIImage+ForImage.h"
#import "TwitterPenConfig.h"

@interface NeverGradeViewController ()

@property (nonatomic, strong) UIView * policyView;
@property (nonatomic, strong) UIImageView * yetView;

@end

@implementation NeverGradeViewController

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = MixSnowBits.protocolApertureMemoryFadeWidthConverged ? [UIColor clearIncludesMenuColumnsBelowEncoded:MixSnowBits.protocolApertureMemoryFadeWidthConverged]:UIColor.whiteColor;

    self.offItsThird = self.thatMainFor;
    [ExistentView boxMedium];
    
    self.policyView = [UIView new];
    self.policyView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.policyView];
    
    self.yetView = [[UIImageView alloc] initWithImage:[UIImage attributeLocaleFixingSequencesProvinceName:MixSnowBits.packRouteToo.renewDidWasWarnRationalReversed]];;
    [self.view addSubview:self.yetView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(skinSolveBit) name:MixSnowBits.packRouteToo.feetPeoplePrincipalReceiverIntegrateCatalan object:nil];
}

- (void)skinSolveBit {
    [self.askUnlocked reload];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self batteryLittleLimitedAlpineNorth];
}

//- (void)viewDidAppear:(BOOL)animated {


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([MixSnowBits maxFitDragPrivacyNordicName] && TwitterPenConfig.shared.learnGallonSuchAbnormalTrait.ignoredLate.safeToolBar) {
        [ExistentView submitAre];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)tapBatchHoldSize {
    if ([UIDevice napNot]) {
        return CGSizeMake(MixSnowBits.sayDefineReleaseProxySearching, MixSnowBits.sayDefineReleaseProxySearching);
    }
    UIWindow *wonTailWindow = [[FactBasicManager shared] arcadeCupIcyWindow];
    UIEdgeInsets safe = wonTailWindow.safeAreaInsets;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        if (![UIDevice replaced]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, MixSnowBits.sayDefineReleaseProxySearching);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, MixSnowBits.sayDefineReleaseProxySearching + safe.bottom);
    }else {
        if (![UIDevice replaced]) {
            return CGSizeMake(MixSnowBits.sayDefineReleaseProxySearching,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(MixSnowBits.sayDefineReleaseProxySearching + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(MixSnowBits.sayDefineReleaseProxySearching + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)batteryLittleLimitedAlpineNorth {
    UIWindow *wonTailWindow = [[FactBasicManager shared] arcadeCupIcyWindow];
    UIEdgeInsets safe = wonTailWindow.safeAreaInsets;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        
        if ([UIDevice napNot]) {
            self.policyView.layer.cornerRadius = 5.f;
            self.policyView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.policyView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(MixSnowBits.packRouteToo.crossAuthors);
        }];
        [self.yetView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.policyView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(MixSnowBits.packRouteToo.mostSnapshot, MixSnowBits.packRouteToo.dogLowerCube));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.tapBatchHoldSize);
        }];
        [self.askUnlocked mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(MixSnowBits.sayDefineReleaseProxySearching);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.tapBatchHoldSize.height);
    }else {
        
        if ([UIDevice napNot]) {
            self.policyView.layer.cornerRadius = 5.f;
            self.policyView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.policyView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(MixSnowBits.packRouteToo.crossAuthors);
        }];
        UIImage *bagCloudImage = [UIImage attributeLocaleFixingSequencesProvinceName:MixSnowBits.packRouteToo.renewDidWasWarnRationalReversed];
        UIImage *signingImage = [UIImage imageWithCGImage:bagCloudImage.CGImage
                                                    scale:bagCloudImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.yetView.image = signingImage;
        [self.yetView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.policyView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(MixSnowBits.packRouteToo.dogLowerCube, MixSnowBits.packRouteToo.mostSnapshot));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.tapBatchHoldSize);
        }];
        [self.askUnlocked mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(MixSnowBits.sayDefineReleaseProxySearching);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.tapBatchHoldSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

- (void)itemPerformsDirectPutOpacity:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    verySum(self);
    [super itemPerformsDirectPutOpacity:touches withEvent:event];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        [UIView animateWithDuration:0.3 animations:^{
            weakself.view.transform = CGAffineTransformMakeTranslation(0, weakself.tapBatchHoldSize.height);;
        } completion:^(BOOL finished) {
            [[FactBasicManager shared] whiteSlashesOverlapBusEnclosingRematchViewController:self.navigationController];
        }];
    }else {
        [UIView animateWithDuration:0.3 animations:^{
            self.view.transform = CGAffineTransformMakeTranslation(-weakself.tapBatchHoldSize.width, 0);
        } completion:^(BOOL finished) {
            [[FactBasicManager shared] whiteSlashesOverlapBusEnclosingRematchViewController:weakself.navigationController];
        }];
    }
}

@end
