






#import "ForCaptionViewController.h"
#import "UseKazakhManager.h"
#import "TomorrowView.h"
#import "UIColor+NotColor.h"
#import "UIDevice+PinDevice.h"
#import "UIImage+BadImage.h"
#import "MixBlobSonConfig.h"

@interface ForCaptionViewController ()

@property (nonatomic, strong) UIView * inviteView;
@property (nonatomic, strong) UIImageView * sinView;

@end

@implementation ForCaptionViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = SafeWaxSort.posterKeyDueOwnerYardAttempter ? [UIColor impactJoinBlurCelticSignalingArrow:SafeWaxSort.posterKeyDueOwnerYardAttempter]:UIColor.whiteColor;

    self.sigmaOurSun = self.tooStairTap;
    [TomorrowView edgaIrish];
    
    self.inviteView = [UIView new];
    self.inviteView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.inviteView];
    
    self.sinView = [[UIImageView alloc] initWithImage:[UIImage rawTatarLiftNicknameParagraphName:SafeWaxSort.sinLaunchCut.onlyOlympusClangZoomingFeedSupply]];;
    [self.view addSubview:self.sinView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(slopeInfoTip) name:SafeWaxSort.sinLaunchCut.whoClosurePlugAloneAnonymousDestroy object:nil];
}

- (void)slopeInfoTip {
    [self.gaspJumpArm reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([SafeWaxSort darkCancelledOpticalClockwiseDailyName] && MixBlobSonConfig.shared.existentCancelsNegateCapturedPush.namePubLose.sameFifteen) {
        [TomorrowView lambdaMin];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)continuedHasSize {
    if ([UIDevice itsWas]) {
        return CGSizeMake(SafeWaxSort.maxVeryLegacyMethodFisheye, SafeWaxSort.maxVeryLegacyMethodFisheye);
    }
    UIWindow *exceedsWindow = [[UseKazakhManager shared] outPintTamilWindow];
    UIEdgeInsets safe = exceedsWindow.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 starMill]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, SafeWaxSort.maxVeryLegacyMethodFisheye);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, SafeWaxSort.maxVeryLegacyMethodFisheye + safe.bottom);
    }else {
        if (![UIDevice starMill]) {
            return CGSizeMake(SafeWaxSort.maxVeryLegacyMethodFisheye,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(SafeWaxSort.maxVeryLegacyMethodFisheye + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(SafeWaxSort.maxVeryLegacyMethodFisheye + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)schedulerUsePortraitRevertOur {
    UIWindow *exceedsWindow = [[UseKazakhManager shared] outPintTamilWindow];
    UIEdgeInsets safe = exceedsWindow.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 itsWas]) {
            self.inviteView.layer.cornerRadius = 5.f;
            self.inviteView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.inviteView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(SafeWaxSort.sinLaunchCut.alienMoodJob);
        }];
        [self.sinView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.inviteView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(SafeWaxSort.sinLaunchCut.cutterDivide, SafeWaxSort.sinLaunchCut.sinFullAgent));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.continuedHasSize);
        }];
        [self.gaspJumpArm mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(SafeWaxSort.maxVeryLegacyMethodFisheye);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.continuedHasSize.height);
    }else {
        
        if ([UIDevice itsWas]) {
            self.inviteView.layer.cornerRadius = 5.f;
            self.inviteView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.inviteView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(SafeWaxSort.sinLaunchCut.alienMoodJob);
        }];
        UIImage *oldClickImage = [UIImage rawTatarLiftNicknameParagraphName:SafeWaxSort.sinLaunchCut.onlyOlympusClangZoomingFeedSupply];
        UIImage *likeOldImage = [UIImage imageWithCGImage:oldClickImage.CGImage
                                                    scale:oldClickImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.sinView.image = likeOldImage;
        [self.sinView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.inviteView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(SafeWaxSort.sinLaunchCut.sinFullAgent, SafeWaxSort.sinLaunchCut.cutterDivide));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.continuedHasSize);
        }];
        [self.gaspJumpArm mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(SafeWaxSort.maxVeryLegacyMethodFisheye);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.continuedHasSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

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

@end
