






#import "SubKindIllViewController.h"
#import "OpaqueKeyManager.h"
#import "ArtsPickView.h"
#import "UIColor+BarColor.h"
#import "UIDevice+ZipDevice.h"
#import "UIImage+RawImage.h"
#import "SizeFactorConfig.h"

@interface SubKindIllViewController ()

@property (nonatomic, strong) UIView * phraseView;
@property (nonatomic, strong) UIImageView * busView;

@end

@implementation SubKindIllViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = FrictionShe.ensureResponderDirectionQuitLowercaseGenre ? [UIColor reportsCinematicSlopeTapDiscreteBag:FrictionShe.ensureResponderDirectionQuitLowercaseGenre]:UIColor.whiteColor;

    self.bothInfoFun = self.wonSiblings;
    [ArtsPickView endGoogle];
    
    self.phraseView = [UIView new];
    self.phraseView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.phraseView];
    
    self.busView = [[UIImageView alloc] initWithImage:[UIImage forbiddenIndoorStaleAllExistingName:FrictionShe.headphoneMay.keyFreestyleVisualShowLatitudeDanish]];;
    [self.view addSubview:self.busView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loopsChamber) name:FrictionShe.headphoneMay.askRevisionsAmpereArrowQualifiedUnlikely object:nil];
}

- (void)loopsChamber {
    [self.carFlowMenu reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([FrictionShe speedPlayWarnVitalWhoName] && SizeFactorConfig.shared.decrementOldLocationBezelSoftball.listOverlap.artDetected) {
        [ArtsPickView sceneSwap];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)gaspOutBreakSize {
    if ([UIDevice butBar]) {
        return CGSizeMake(FrictionShe.panoramaModerateRenewedMemberContacts, FrictionShe.panoramaModerateRenewedMemberContacts);
    }
    UIWindow *pubMoleWindow = [[OpaqueKeyManager shared] onlineResignWindow];
    UIEdgeInsets safe = pubMoleWindow.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 allowAir]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, FrictionShe.panoramaModerateRenewedMemberContacts);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, FrictionShe.panoramaModerateRenewedMemberContacts + safe.bottom);
    }else {
        if (![UIDevice allowAir]) {
            return CGSizeMake(FrictionShe.panoramaModerateRenewedMemberContacts,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(FrictionShe.panoramaModerateRenewedMemberContacts + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(FrictionShe.panoramaModerateRenewedMemberContacts + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)rollVideoSaltRawSmooth {
    UIWindow *pubMoleWindow = [[OpaqueKeyManager shared] onlineResignWindow];
    UIEdgeInsets safe = pubMoleWindow.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 butBar]) {
            self.phraseView.layer.cornerRadius = 5.f;
            self.phraseView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.phraseView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(FrictionShe.headphoneMay.widthDateBox);
        }];
        [self.busView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.phraseView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(FrictionShe.headphoneMay.indicesUnion, FrictionShe.headphoneMay.lightSelfFat));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.gaspOutBreakSize);
        }];
        [self.carFlowMenu mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(FrictionShe.panoramaModerateRenewedMemberContacts);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.gaspOutBreakSize.height);
    }else {
        
        if ([UIDevice butBar]) {
            self.phraseView.layer.cornerRadius = 5.f;
            self.phraseView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.phraseView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(FrictionShe.headphoneMay.widthDateBox);
        }];
        UIImage *atomEastImage = [UIImage forbiddenIndoorStaleAllExistingName:FrictionShe.headphoneMay.keyFreestyleVisualShowLatitudeDanish];
        UIImage *bagKindImage = [UIImage imageWithCGImage:atomEastImage.CGImage
                                                    scale:atomEastImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.busView.image = bagKindImage;
        [self.busView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.phraseView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(FrictionShe.headphoneMay.lightSelfFat, FrictionShe.headphoneMay.indicesUnion));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.gaspOutBreakSize);
        }];
        [self.carFlowMenu mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(FrictionShe.panoramaModerateRenewedMemberContacts);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.gaspOutBreakSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

- (void)airMasterDolbyMixScore:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    canRace(self);
    [super airMasterDolbyMixScore: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.gaspOutBreakSize.height);;
        } completion:^(BOOL finished) {
            [[OpaqueKeyManager shared] periodScreenYearsExposeWatchedExtendingViewController:self.navigationController];
        }];
    }else {
        [UIView animateWithDuration:0.3 animations:^{
            self.view.transform = CGAffineTransformMakeTranslation(-weakself.gaspOutBreakSize.width, 0);
        } completion:^(BOOL finished) {
            [[OpaqueKeyManager shared] periodScreenYearsExposeWatchedExtendingViewController:weakself.navigationController];
        }];
    }
}

@end
