






#import "MagentaTripleViewController.h"
#import "ChunkyGetManager.h"
#import "MostSwapView.h"
#import "UIColor+RawColor.h"
#import "UIDevice+CupDevice.h"
#import "UIImage+OptImage.h"
#import "ZoomingPinConfig.h"


@implementation MagentaTripleViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = BinTopLemma.serialOccurFlatImpactPenSocial ? [UIColor collapsesCompositeAndRenamingWorldDecrypted:BinTopLemma.serialOccurFlatImpactPenSocial]:UIColor.whiteColor;

    self.gaspUnsaved = self.boldInfoTip;
    [MostSwapView warnSpace];
    

    self.overlapRows.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.overlapRows mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(butIconSetup) name:BinTopLemma.drainCatFair.tertiarySlashPerfusionRowWakeHundreds object:nil];
}

- (void)butIconSetup {
    [self.overlapRows reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([BinTopLemma playRelationTextCountryFitName] && ZoomingPinConfig.shared.flippedYellowMetricWonMenstrual.ignoreDigit.whoReverses) {
        [MostSwapView cellShare];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)leftInternalSize {
    UIWindow *recycleWindow = [[ChunkyGetManager shared] identicalDogWindow];
    UIEdgeInsets safe = recycleWindow.safeAreaInsets;
    CGFloat allDueEndsLog = 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 energy]) {//无刘海
            allDueEndsLog = UIScreen.mainScreen.bounds.size.height*BinTopLemma.winSpeechCurrentlyNotSin;
        }else {
            allDueEndsLog = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*BinTopLemma.winSpeechCurrentlyNotSin;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, allDueEndsLog);
        
    }else { 
        if (![UIDevice hasNotch] || [UIDevice energy]) {//无刘海
            allDueEndsLog = UIScreen.mainScreen.bounds.size.width * BinTopLemma.winSpeechCurrentlyNotSin;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                allDueEndsLog = (UIScreen.mainScreen.bounds.size.width - safe.left) * BinTopLemma.winSpeechCurrentlyNotSin;
            }else {
                allDueEndsLog = (UIScreen.mainScreen.bounds.size.width - safe.right) * BinTopLemma.winSpeechCurrentlyNotSin;
            }
        }
        return CGSizeMake(allDueEndsLog, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)droppedTeaspoonsSystemClickPicker {
    UIWindow *recycleWindow = [[ChunkyGetManager shared] identicalDogWindow];
    UIEdgeInsets safe = recycleWindow.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.leftInternalSize);
        }];
    }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.leftInternalSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.leftInternalSize);
            }];
        }
    }
}

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

@end
