






#import "SunEyeTaskSeeViewController.h"
#import "StrictBigManager.h"
#import "LaunchedView.h"
#import "UIColor+OddColor.h"
#import "UIDevice+LawDevice.h"
#import "UIImage+BusImage.h"
#import "FailKitEndConfig.h"


@implementation SunEyeTaskSeeViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = AdverbTamil.acquireAttitudeBlobComputerSolidBar ? [UIColor amharicIronEncodeFeetGaspLoose:AdverbTamil.acquireAttitudeBlobComputerSolidBar]:UIColor.whiteColor;

    self.tryWriteOld = self.kinPortrait;
    [LaunchedView trustPass];
    

    self.leaveEntity.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.leaveEntity mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(icyEarlyNext) name:AdverbTamil.bedUndoReuse.atomTowerSharpnessOneInfinityMax object:nil];
}

- (void)icyEarlyNext {
    [self.leaveEntity reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([AdverbTamil headSetupFlipStrongHailName] && FailKitEndConfig.shared.designEpsilonDecodeEstimatePotassium.itemHisDraw.singleLower) {
        [LaunchedView gradeLoud];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)mouthRunMoveSize {
    UIWindow *busTaskWindow = [[StrictBigManager shared] criteriaPushWindow];
    UIEdgeInsets safe = busTaskWindow.safeAreaInsets;
    CGFloat consumedEarly = 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 badSheet] || [UIDevice armour]) {//无刘海
            consumedEarly = UIScreen.mainScreen.bounds.size.height*AdverbTamil.eitherWaxExpandArtsDifferent;
        }else {
            consumedEarly = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*AdverbTamil.eitherWaxExpandArtsDifferent;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, consumedEarly);
        
    }else { 
        if (![UIDevice badSheet] || [UIDevice armour]) {//无刘海
            consumedEarly = UIScreen.mainScreen.bounds.size.width * AdverbTamil.eitherWaxExpandArtsDifferent;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                consumedEarly = (UIScreen.mainScreen.bounds.size.width - safe.left) * AdverbTamil.eitherWaxExpandArtsDifferent;
            }else {
                consumedEarly = (UIScreen.mainScreen.bounds.size.width - safe.right) * AdverbTamil.eitherWaxExpandArtsDifferent;
            }
        }
        return CGSizeMake(consumedEarly, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)decryptedJobFactorExpansionNote {
    UIWindow *busTaskWindow = [[StrictBigManager shared] criteriaPushWindow];
    UIEdgeInsets safe = busTaskWindow.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.mouthRunMoveSize);
        }];
    }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.mouthRunMoveSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.mouthRunMoveSize);
            }];
        }
    }
}

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

@end
