






#import "OriginStepViewController.h"
#import "StrictBigManager.h"
#import "LaunchedView.h"
#import "UIColor+OddColor.h"
#import "UIDevice+LawDevice.h"
#import "UIImage+BusImage.h"
#import "FailKitEndConfig.h"

@interface OriginStepViewController ()

@property (nonatomic, strong) UIView * basqueView;
@property (nonatomic, strong) UIImageView * subView;

@end

@implementation OriginStepViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = AdverbTamil.acquireAttitudeBlobComputerSolidBar ? [UIColor amharicIronEncodeFeetGaspLoose:AdverbTamil.acquireAttitudeBlobComputerSolidBar]:UIColor.whiteColor;

    self.tryWriteOld = self.kinPortrait;
    [LaunchedView trustPass];
    
    self.basqueView = [UIView new];
    self.basqueView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.basqueView];
    
    self.subView = [[UIImageView alloc] initWithImage:[UIImage smoothBinBadConnectClickedName:AdverbTamil.bedUndoReuse.bondOptFreeUseBestEnhance]];;
    [self.view addSubview:self.subView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(icyEarlyNext) name:AdverbTamil.bedUndoReuse.atomTowerSharpnessOneInfinityMax object:nil];
}

- (void)icyEarlyNext {
    [self.leaveEntity reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([AdverbTamil headSetupFlipStrongHailName] && FailKitEndConfig.shared.designEpsilonDecodeEstimatePotassium.itemHisDraw.singleLower) {
        [LaunchedView gradeLoud];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)mouthRunMoveSize {
    if ([UIDevice armour]) {
        return CGSizeMake(AdverbTamil.receivesEastEpsilonPrincipalMedium, AdverbTamil.receivesEastEpsilonPrincipalMedium);
    }
    UIWindow *busTaskWindow = [[StrictBigManager shared] criteriaPushWindow];
    UIEdgeInsets safe = busTaskWindow.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 badSheet]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, AdverbTamil.receivesEastEpsilonPrincipalMedium);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, AdverbTamil.receivesEastEpsilonPrincipalMedium + safe.bottom);
    }else {
        if (![UIDevice badSheet]) {
            return CGSizeMake(AdverbTamil.receivesEastEpsilonPrincipalMedium,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(AdverbTamil.receivesEastEpsilonPrincipalMedium + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(AdverbTamil.receivesEastEpsilonPrincipalMedium + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)decryptedJobFactorExpansionNote {
    UIWindow *busTaskWindow = [[StrictBigManager shared] criteriaPushWindow];
    UIEdgeInsets safe = busTaskWindow.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 armour]) {
            self.basqueView.layer.cornerRadius = 5.f;
            self.basqueView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.basqueView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(AdverbTamil.bedUndoReuse.midHasSoccer);
        }];
        [self.subView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.basqueView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(AdverbTamil.bedUndoReuse.hasSensorHex, AdverbTamil.bedUndoReuse.funkCreation));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.mouthRunMoveSize);
        }];
        [self.leaveEntity mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(AdverbTamil.receivesEastEpsilonPrincipalMedium);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.mouthRunMoveSize.height);
    }else {
        
        if ([UIDevice armour]) {
            self.basqueView.layer.cornerRadius = 5.f;
            self.basqueView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.basqueView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(AdverbTamil.bedUndoReuse.midHasSoccer);
        }];
        UIImage *obscuredImage = [UIImage smoothBinBadConnectClickedName:AdverbTamil.bedUndoReuse.bondOptFreeUseBestEnhance];
        UIImage *raceCatImage = [UIImage imageWithCGImage:obscuredImage.CGImage
                                                    scale:obscuredImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.subView.image = raceCatImage;
        [self.subView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.basqueView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(AdverbTamil.bedUndoReuse.funkCreation, AdverbTamil.bedUndoReuse.hasSensorHex));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.mouthRunMoveSize);
        }];
        [self.leaveEntity mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(AdverbTamil.receivesEastEpsilonPrincipalMedium);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.mouthRunMoveSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

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

@end
