






#import "FixMealSubForViewController.h"
#import "ExtendingManager.h"
#import "BlobSentView.h"
#import "UIColor+HueColor.h"
#import "UIDevice+MixDevice.h"
#import "UIImage+ItsImage.h"
#import "PinDueListConfig.h"


@implementation FixMealSubForViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = TopMergeNap.rootSuddenMaskSocketStreamFun ? [UIColor seventeenExponentCloudyAboutPresentedLinger:TopMergeNap.rootSuddenMaskSocketStreamFun]:UIColor.whiteColor;

    self.butMixerFun = self.fullDustPan;
    [BlobSentView warnStale];
    

    self.legalActive.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.legalActive mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(oldWhoNearby) name:TopMergeNap.yetChromaUse.doneEasyAgentButCommandDesired object:nil];
}

- (void)oldWhoNearby {
    [self.legalActive reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([TopMergeNap highModelCategoryKerningSwahiliName] && PinDueListConfig.shared.paceGradeEldestPredictedUndefined.whoMoreReal.callNapPint) {
        [BlobSentView kazakhRaw];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)lateAdaptiveSize {
    UIWindow *pingRetWindow = [[ExtendingManager shared] startupBadgeWindow];
    UIEdgeInsets safe = pingRetWindow.safeAreaInsets;
    CGFloat kitFaxOddRear = 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 pubTorch] || [UIDevice hueCat]) {//无刘海
            kitFaxOddRear = UIScreen.mainScreen.bounds.size.height*TopMergeNap.consumesStalledEngineerIntegerNot;
        }else {
            kitFaxOddRear = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*TopMergeNap.consumesStalledEngineerIntegerNot;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, kitFaxOddRear);
        
    }else { 
        if (![UIDevice pubTorch] || [UIDevice hueCat]) {//无刘海
            kitFaxOddRear = UIScreen.mainScreen.bounds.size.width * TopMergeNap.consumesStalledEngineerIntegerNot;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                kitFaxOddRear = (UIScreen.mainScreen.bounds.size.width - safe.left) * TopMergeNap.consumesStalledEngineerIntegerNot;
            }else {
                kitFaxOddRear = (UIScreen.mainScreen.bounds.size.width - safe.right) * TopMergeNap.consumesStalledEngineerIntegerNot;
            }
        }
        return CGSizeMake(kitFaxOddRear, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)methodMinimizeBasicEyeReject {
    UIWindow *pingRetWindow = [[ExtendingManager shared] startupBadgeWindow];
    UIEdgeInsets safe = pingRetWindow.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.lateAdaptiveSize);
        }];
    }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.lateAdaptiveSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.lateAdaptiveSize);
            }];
        }
    }
}

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

@end
