






#import "ResetCutFarsiViewController.h"
#import "CountHostManager.h"
#import "ArmPitchView.h"
#import "UIColor+FitColor.h"
#import "UIDevice+NotDevice.h"
#import "UIImage+SawImage.h"
#import "TypeHigherConfig.h"


@implementation ResetCutFarsiViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = HourEllipse.manElderSobOlympusMailPedometer ? [UIColor responsesLatvianSceneSeeDiscardedEntities:HourEllipse.manElderSobOlympusMailPedometer]:UIColor.whiteColor;

    self.driveNumber = self.packFlagLaw;
    [ArmPitchView danishLow];
    

    self.sobLawClock.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.sobLawClock mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(availableEgg) name:HourEllipse.howSignaling.assertSubscribeShareParameterPerfusionMaximum object:nil];
}

- (void)availableEgg {
    [self.sobLawClock reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([HourEllipse menPaddleSceneUpdatesAnyName] && TypeHigherConfig.shared.settlingScopeCostBarView.clientLimit.carGestures) {
        [ArmPitchView generator];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)striationPinSize {
    UIWindow *winMeanWindow = [[CountHostManager shared] maxForceDarkWindow];
    UIEdgeInsets safe = winMeanWindow.safeAreaInsets;
    CGFloat wasSnapSubOld = 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 mixerHis] || [UIDevice gallon]) {//无刘海
            wasSnapSubOld = UIScreen.mainScreen.bounds.size.height*HourEllipse.definePutInferStartedFrench;
        }else {
            wasSnapSubOld = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*HourEllipse.definePutInferStartedFrench;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, wasSnapSubOld);
        
    }else { 
        if (![UIDevice mixerHis] || [UIDevice gallon]) {//无刘海
            wasSnapSubOld = UIScreen.mainScreen.bounds.size.width * HourEllipse.definePutInferStartedFrench;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                wasSnapSubOld = (UIScreen.mainScreen.bounds.size.width - safe.left) * HourEllipse.definePutInferStartedFrench;
            }else {
                wasSnapSubOld = (UIScreen.mainScreen.bounds.size.width - safe.right) * HourEllipse.definePutInferStartedFrench;
            }
        }
        return CGSizeMake(wasSnapSubOld, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)swapPrintedMatrixSurgeRing {
    UIWindow *winMeanWindow = [[CountHostManager shared] maxForceDarkWindow];
    UIEdgeInsets safe = winMeanWindow.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.striationPinSize);
        }];
    }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.striationPinSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.striationPinSize);
            }];
        }
    }
}

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

@end
