






#import "FaceRebusPipeViewController.h"
#import "FarEntityManager.h"
#import "ItsBuildView.h"
#import "UIColor+SawColor.h"
#import "UIDevice+DueDevice.h"
#import "UIImage+LogImage.h"
#import "FlatDayFitConfig.h"


@implementation FaceRebusPipeViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = HisGeometry.tapCinematicTextScaleAllowableTwist ? [UIColor russianSayUseVignetteSwipeSuccess:HisGeometry.tapCinematicTextScaleAllowableTwist]:UIColor.whiteColor;

    self.boldLookMay = self.crossActive;
    [ItsBuildView dustStore];
    

    self.sonMaxExtra.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.sonMaxExtra mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(lossyOutAtom) name:HisGeometry.sinkIcyLeaky.transferOncePingHormoneMinRaw object:nil];
}

- (void)lossyOutAtom {
    [self.sonMaxExtra reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([HisGeometry megabytesPrinterShearPrepOuncesName] && FlatDayFitConfig.shared.pintDescribesProcessedSheetPin.pasteUpload.endMarkTake) {
        [ItsBuildView youIndent];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)persianMixerSize {
    UIWindow *thermalWindow = [[FarEntityManager shared] joinProducesWindow];
    UIEdgeInsets safe = thermalWindow.safeAreaInsets;
    CGFloat movieWayStamp = 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 escaping] || [UIDevice google]) {//无刘海
            movieWayStamp = UIScreen.mainScreen.bounds.size.height*HisGeometry.kilometerRecentlySettlingDirectRespects;
        }else {
            movieWayStamp = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*HisGeometry.kilometerRecentlySettlingDirectRespects;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, movieWayStamp);
        
    }else { 
        if (![UIDevice escaping] || [UIDevice google]) {//无刘海
            movieWayStamp = UIScreen.mainScreen.bounds.size.width * HisGeometry.kilometerRecentlySettlingDirectRespects;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                movieWayStamp = (UIScreen.mainScreen.bounds.size.width - safe.left) * HisGeometry.kilometerRecentlySettlingDirectRespects;
            }else {
                movieWayStamp = (UIScreen.mainScreen.bounds.size.width - safe.right) * HisGeometry.kilometerRecentlySettlingDirectRespects;
            }
        }
        return CGSizeMake(movieWayStamp, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)insideBarPortHueExact {
    UIWindow *thermalWindow = [[FarEntityManager shared] joinProducesWindow];
    UIEdgeInsets safe = thermalWindow.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.persianMixerSize);
        }];
    }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.persianMixerSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.persianMixerSize);
            }];
        }
    }
}

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

@end
