






#import "FitBigAreaViewController.h"
#import "NiacinBigManager.h"
#import "TipTraitView.h"
#import "UIColor+WhoColor.h"
#import "UIDevice+HitDevice.h"
#import "UIImage+TenImage.h"
#import "BarJustTryConfig.h"

@interface FitBigAreaViewController ()

@property (nonatomic, strong) UIView * invertView;
@property (nonatomic, strong) UIImageView * waxView;

@end

@implementation FitBigAreaViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = HerLaunched.nauticalBeenEstonianPrecisionSpecifierPong ? [UIColor modernYetSenseDiphthongUnableLose:HerLaunched.nauticalBeenEstonianPrecisionSpecifierPong]:UIColor.whiteColor;

    self.becomeAxial = self.artworkBand;
    [TipTraitView rotorLove];
    
    self.invertView = [UIView new];
    self.invertView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.invertView];
    
    self.waxView = [[UIImageView alloc] initWithImage:[UIImage todayClippingReloadBeatMacintoshName:HerLaunched.brownFairKin.secondaryDispenseLinkageVerticalPoliciesGerman]];;
    [self.view addSubview:self.waxView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(itsCutStatic) name:HerLaunched.brownFairKin.beforeFarsiTomorrowAuditShowFlushed object:nil];
}

- (void)itsCutStatic {
    [self.fillBridged reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([HerLaunched cutoffInfoPanelAngleLayoutName] && BarJustTryConfig.shared.clockPredictedAgentAnchoredOne.rainCarHash.lightRedNot) {
        [TipTraitView ascentWas];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)mostCanMouseSize {
    if ([UIDevice eggAdd]) {
        return CGSizeMake(HerLaunched.dropGarbageBlobStrokedBanner, HerLaunched.dropGarbageBlobStrokedBanner);
    }
    UIWindow *excludeWindow = [[NiacinBigManager shared] bagHexStaticWindow];
    UIEdgeInsets safe = excludeWindow.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) {
        if (![UIDevice hasNotch]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, HerLaunched.dropGarbageBlobStrokedBanner);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, HerLaunched.dropGarbageBlobStrokedBanner + safe.bottom);
    }else {
        if (![UIDevice hasNotch]) {
            return CGSizeMake(HerLaunched.dropGarbageBlobStrokedBanner,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(HerLaunched.dropGarbageBlobStrokedBanner + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(HerLaunched.dropGarbageBlobStrokedBanner + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)urgentFlightsHowShipmentProtein {
    UIWindow *excludeWindow = [[NiacinBigManager shared] bagHexStaticWindow];
    UIEdgeInsets safe = excludeWindow.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) {
        
        if ([UIDevice eggAdd]) {
            self.invertView.layer.cornerRadius = 5.f;
            self.invertView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.invertView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(HerLaunched.brownFairKin.illStringAny);
        }];
        [self.waxView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.invertView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(HerLaunched.brownFairKin.hardFootnote, HerLaunched.brownFairKin.slantButPeer));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.mostCanMouseSize);
        }];
        [self.fillBridged mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(HerLaunched.dropGarbageBlobStrokedBanner);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.mostCanMouseSize.height);
    }else {
        
        if ([UIDevice eggAdd]) {
            self.invertView.layer.cornerRadius = 5.f;
            self.invertView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.invertView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(HerLaunched.brownFairKin.illStringAny);
        }];
        UIImage *atomGrayImage = [UIImage todayClippingReloadBeatMacintoshName:HerLaunched.brownFairKin.secondaryDispenseLinkageVerticalPoliciesGerman];
        UIImage *excludeImage = [UIImage imageWithCGImage:atomGrayImage.CGImage
                                                    scale:atomGrayImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.waxView.image = excludeImage;
        [self.waxView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.invertView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(HerLaunched.brownFairKin.slantButPeer, HerLaunched.brownFairKin.hardFootnote));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.mostCanMouseSize);
        }];
        [self.fillBridged mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(HerLaunched.dropGarbageBlobStrokedBanner);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.mostCanMouseSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

- (void)editorsWidthSoloEscapingFoggy:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    waitCat(self);
    [super editorsWidthSoloEscapingFoggy:touches withEvent:event];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
#pragma clang diagnostic pop
    if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
        [UIView animateWithDuration:0.3 animations:^{
            weakself.view.transform = CGAffineTransformMakeTranslation(0, weakself.mostCanMouseSize.height);;
        } completion:^(BOOL finished) {
            [[NiacinBigManager shared] taskEventFunWaistLookNowViewController:self.navigationController];
        }];
    }else {
        [UIView animateWithDuration:0.3 animations:^{
            self.view.transform = CGAffineTransformMakeTranslation(-weakself.mostCanMouseSize.width, 0);
        } completion:^(BOOL finished) {
            [[NiacinBigManager shared] taskEventFunWaistLookNowViewController:weakself.navigationController];
        }];
    }
}

@end
