






#import "PairSubmittedViewController.h"
#import "CombiningManager.h"
#import "SonOrderView.h"
#import "UIColor+OutColor.h"
#import "UIDevice+WhoDevice.h"
#import "UIImage+MinImage.h"
#import "AddButBackConfig.h"


@implementation PairSubmittedViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = ApplyToggle.refreshWristFractionAlienAndLaunch ? [UIColor supportedPopFlatInsideAndTornado:ApplyToggle.refreshWristFractionAlienAndLaunch]:UIColor.whiteColor;

    self.emailSayKey = self.dayNorthPan;
    [SonOrderView performer];
    

    self.inputScreen.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.inputScreen mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(armWindowMin) name:ApplyToggle.findSwipeOur.presenceConnectedCreatorMarkFemaleUndo object:nil];
}

- (void)armWindowMin {
    [self.inputScreen reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([ApplyToggle scopeFixRevisionsNineUnwindingName] && AddButBackConfig.shared.clockSerifYetSayPartially.inferHisOld.bestWonAuto) {
        [SonOrderView localeFix];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)hairSuitableSize {
    UIWindow *historyWindow = [[CombiningManager shared] ownNegotiateWindow];
    UIEdgeInsets safe = historyWindow.safeAreaInsets;
    CGFloat coverFairCube = 0;
#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 rateCell] || [UIDevice lowMin]) {//无刘海
            coverFairCube = UIScreen.mainScreen.bounds.size.height*ApplyToggle.mathKindMaintainRedefinedBit;
        }else {
            coverFairCube = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*ApplyToggle.mathKindMaintainRedefinedBit;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, coverFairCube);
        
    }else { 
        if (![UIDevice rateCell] || [UIDevice lowMin]) {//无刘海
            coverFairCube = UIScreen.mainScreen.bounds.size.width * ApplyToggle.mathKindMaintainRedefinedBit;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                coverFairCube = (UIScreen.mainScreen.bounds.size.width - safe.left) * ApplyToggle.mathKindMaintainRedefinedBit;
            }else {
                coverFairCube = (UIScreen.mainScreen.bounds.size.width - safe.right) * ApplyToggle.mathKindMaintainRedefinedBit;
            }
        }
        return CGSizeMake(coverFairCube, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)executeMaximumConflictJapaneseLow {
    UIWindow *historyWindow = [[CombiningManager shared] ownNegotiateWindow];
    UIEdgeInsets safe = historyWindow.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) {
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.hairSuitableSize);
        }];
    }else {
        
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.mas_equalTo(0);
                make.left.mas_equalTo(safe.left);
                make.size.mas_equalTo(self.hairSuitableSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.hairSuitableSize);
            }];
        }
    }
}

- (void)pencilAnimatedUnlockGuestStatic:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [super pencilAnimatedUnlockGuestStatic:touches withEvent:event];
    [[CombiningManager shared] solveBoldGatherMapTopExchangesViewController:self.navigationController];
}

@end
