






#import "IcyDirtyFlushViewController.h"
#import "OpaqueKeyManager.h"
#import "ArtsPickView.h"
#import "UIColor+BarColor.h"
#import "UIDevice+ZipDevice.h"
#import "UIImage+RawImage.h"
#import "SizeFactorConfig.h"


@implementation IcyDirtyFlushViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = FrictionShe.ensureResponderDirectionQuitLowercaseGenre ? [UIColor reportsCinematicSlopeTapDiscreteBag:FrictionShe.ensureResponderDirectionQuitLowercaseGenre]:UIColor.whiteColor;

    self.bothInfoFun = self.wonSiblings;
    [ArtsPickView endGoogle];
    

    self.carFlowMenu.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.carFlowMenu mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loopsChamber) name:FrictionShe.headphoneMay.askRevisionsAmpereArrowQualifiedUnlikely object:nil];
}

- (void)loopsChamber {
    [self.carFlowMenu reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([FrictionShe speedPlayWarnVitalWhoName] && SizeFactorConfig.shared.decrementOldLocationBezelSoftball.listOverlap.artDetected) {
        [ArtsPickView sceneSwap];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)gaspOutBreakSize {
    UIWindow *pubMoleWindow = [[OpaqueKeyManager shared] onlineResignWindow];
    UIEdgeInsets safe = pubMoleWindow.safeAreaInsets;
    CGFloat quantizeGroup = 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 allowAir] || [UIDevice butBar]) {//无刘海
            quantizeGroup = UIScreen.mainScreen.bounds.size.height*FrictionShe.parsingRealDisorderFurlongsChunky;
        }else {
            quantizeGroup = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*FrictionShe.parsingRealDisorderFurlongsChunky;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, quantizeGroup);
        
    }else { 
        if (![UIDevice allowAir] || [UIDevice butBar]) {//无刘海
            quantizeGroup = UIScreen.mainScreen.bounds.size.width * FrictionShe.parsingRealDisorderFurlongsChunky;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                quantizeGroup = (UIScreen.mainScreen.bounds.size.width - safe.left) * FrictionShe.parsingRealDisorderFurlongsChunky;
            }else {
                quantizeGroup = (UIScreen.mainScreen.bounds.size.width - safe.right) * FrictionShe.parsingRealDisorderFurlongsChunky;
            }
        }
        return CGSizeMake(quantizeGroup, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)rollVideoSaltRawSmooth {
    UIWindow *pubMoleWindow = [[OpaqueKeyManager shared] onlineResignWindow];
    UIEdgeInsets safe = pubMoleWindow.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.gaspOutBreakSize);
        }];
    }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.gaspOutBreakSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.gaspOutBreakSize);
            }];
        }
    }
}

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

@end
