






#import "PaperRemotelyViewController.h"
#import "PredicateManager.h"
#import "MagicAskView.h"
#import "UIColor+TheColor.h"
#import "UIDevice+WaxDevice.h"
#import "UIImage+DayImage.h"
#import "SoloCutterConfig.h"


@implementation PaperRemotelyViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = AlbumBoxSex.yetWelshSpeechReplaceYahooSwashes ? [UIColor provideClangAdvanceExpiresTeaspoonsJob:AlbumBoxSex.yetWelshSpeechReplaceYahooSwashes]:UIColor.whiteColor;

    self.actionHuman = self.eyeLostSink;
    [MagicAskView mapTremor];
    

    self.icyCutPrint.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.icyCutPrint mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(allInterHost) name:AlbumBoxSex.catalanHertz.appearingClearedOrganizeComplexInfoWaist object:nil];
}

- (void)allInterHost {
    [self.icyCutPrint reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([AlbumBoxSex providesAscendedAddressLongerAdvancesName] && SoloCutterConfig.shared.pressesDaughtersDayLearnAlcohol.smallerInfo.estimatePin) {
        [MagicAskView artUighur];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)chatReusableSize {
    UIWindow *offSaveWindow = [[PredicateManager shared] companyLeakyWindow];
    UIEdgeInsets safe = offSaveWindow.safeAreaInsets;
    CGFloat blurTrySunOld = 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 hasNotch] || [UIDevice ampere]) {//无刘海
            blurTrySunOld = UIScreen.mainScreen.bounds.size.height*AlbumBoxSex.transitAffectingFingerChunkSugar;
        }else {
            blurTrySunOld = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*AlbumBoxSex.transitAffectingFingerChunkSugar;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, blurTrySunOld);
        
    }else { 
        if (![UIDevice hasNotch] || [UIDevice ampere]) {//无刘海
            blurTrySunOld = UIScreen.mainScreen.bounds.size.width * AlbumBoxSex.transitAffectingFingerChunkSugar;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                blurTrySunOld = (UIScreen.mainScreen.bounds.size.width - safe.left) * AlbumBoxSex.transitAffectingFingerChunkSugar;
            }else {
                blurTrySunOld = (UIScreen.mainScreen.bounds.size.width - safe.right) * AlbumBoxSex.transitAffectingFingerChunkSugar;
            }
        }
        return CGSizeMake(blurTrySunOld, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)permanentFaxRedirectVectorSymbol {
    UIWindow *offSaveWindow = [[PredicateManager shared] companyLeakyWindow];
    UIEdgeInsets safe = offSaveWindow.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.chatReusableSize);
        }];
    }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.chatReusableSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.chatReusableSize);
            }];
        }
    }
}

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

@end
