






#import "EndWeekdaySawViewController.h"
#import "SleepPairManager.h"
#import "CapturesView.h"
#import "UIColor+WasColor.h"
#import "UIDevice+MidDevice.h"
#import "UIImage+DogImage.h"
#import "WayMastersConfig.h"


@implementation EndWeekdaySawViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = SobIllWelsh.spokenDrySpeakersReportsWaxSupply ? [UIColor serviceFootnoteFractionAnnotatedLyricistTop:SobIllWelsh.spokenDrySpeakersReportsWaxSupply]:UIColor.whiteColor;

    self.vignetteTen = self.retBlurTime;
    [CapturesView rejection];
    

    self.nearBurnIcy.opaque = NO;
    self.view.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0];
    
    [self.nearBurnIcy mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jouleContext) name:SobIllWelsh.followBigKit.danishDuctilitySourcesFootersCreditsRaw object:nil];
}

- (void)jouleContext {
    [self.nearBurnIcy reload];
}


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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([SobIllWelsh triggerOddNapImportantSceneName] && WayMastersConfig.shared.lacrosseSpeedUsesHeapMultiple.diamondBand.talkTypeMen) {
        [CapturesView deriveOne];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)soundParsingSize {
    UIWindow *busListWindow = [[SleepPairManager shared] specifierKinWindow];
    UIEdgeInsets safe = busListWindow.safeAreaInsets;
    CGFloat twoSpaTalkDry = 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 sumGroup] || [UIDevice cupEra]) {//无刘海
            twoSpaTalkDry = UIScreen.mainScreen.bounds.size.height*SobIllWelsh.extendAskDepthAreLuminance;
        }else {
            twoSpaTalkDry = (UIScreen.mainScreen.bounds.size.height - safe.bottom)*SobIllWelsh.extendAskDepthAreLuminance;
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, twoSpaTalkDry);
        
    }else { 
        if (![UIDevice sumGroup] || [UIDevice cupEra]) {//无刘海
            twoSpaTalkDry = UIScreen.mainScreen.bounds.size.width * SobIllWelsh.extendAskDepthAreLuminance;
        }else {
            if (orientation == UIInterfaceOrientationLandscapeRight) {
                twoSpaTalkDry = (UIScreen.mainScreen.bounds.size.width - safe.left) * SobIllWelsh.extendAskDepthAreLuminance;
            }else {
                twoSpaTalkDry = (UIScreen.mainScreen.bounds.size.width - safe.right) * SobIllWelsh.extendAskDepthAreLuminance;
            }
        }
        return CGSizeMake(twoSpaTalkDry, UIScreen.mainScreen.bounds.size.height);
    }
}

- (void)chooseIslamicAmbientNominallyDependent {
    UIWindow *busListWindow = [[SleepPairManager shared] specifierKinWindow];
    UIEdgeInsets safe = busListWindow.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.soundParsingSize);
        }];
    }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.soundParsingSize);
            }];
        }else {
            [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                make.centerY.left.mas_equalTo(0);
                make.size.mas_equalTo(self.soundParsingSize);
            }];
        }
    }
}

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

@end
