






#import "AdobePlateViewController.h"
#import "PerformerManager.h"
#import "AliveFarView.h"
#import "UIColor+HerColor.h"
#import "UIDevice+NapDevice.h"
#import "UIImage+DryImage.h"
#import "CubePosterConfig.h"

@interface AdobePlateViewController ()

@property (nonatomic, strong) UIView * sparseView;
@property (nonatomic, strong) UIImageView * napView;

@end

@implementation AdobePlateViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = RedFlexible.dynamicYouKilohertzWasRenderRussian ? [UIColor portalLegalFiveRectifiedAnswerRepeat:RedFlexible.dynamicYouKilohertzWasRenderRussian]:UIColor.whiteColor;

    self.matrixApple = self.manyLeadOur;
    [AliveFarView illCousin];
    
    self.sparseView = [UIView new];
    self.sparseView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.sparseView];
    
    self.napView = [[UIImageView alloc] initWithImage:[UIImage detectedSeeExpectsSamplingEndsName:RedFlexible.capContinued.universalPrincipalTouchPhaseDryMap]];;
    [self.view addSubview:self.napView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(ironOldTrust) name:RedFlexible.capContinued.linearlyBuildEndIndexesKelvinInjection object:nil];
}

- (void)ironOldTrust {
    [self.twoObserved reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([RedFlexible spaTransmitSameLeaveGeorgianName] && CubePosterConfig.shared.whoPresenterNapGermanInfinity.absoluteRaw.tabWeighted) {
        [AliveFarView hiddenArm];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)andPotentialSize {
    if ([UIDevice putKin]) {
        return CGSizeMake(RedFlexible.quotesStripCreatorCapturingMin, RedFlexible.quotesStripCreatorCapturingMin);
    }
    UIWindow *succeedWindow = [[PerformerManager shared] sobHandBasalWindow];
    UIEdgeInsets safe = succeedWindow.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 gateways]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, RedFlexible.quotesStripCreatorCapturingMin);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, RedFlexible.quotesStripCreatorCapturingMin + safe.bottom);
    }else {
        if (![UIDevice gateways]) {
            return CGSizeMake(RedFlexible.quotesStripCreatorCapturingMin,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(RedFlexible.quotesStripCreatorCapturingMin + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(RedFlexible.quotesStripCreatorCapturingMin + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)plainSolveAllowVisibleKit {
    UIWindow *succeedWindow = [[PerformerManager shared] sobHandBasalWindow];
    UIEdgeInsets safe = succeedWindow.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 putKin]) {
            self.sparseView.layer.cornerRadius = 5.f;
            self.sparseView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.sparseView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(RedFlexible.capContinued.rowDeleteMan);
        }];
        [self.napView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.sparseView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(RedFlexible.capContinued.trapSystolic, RedFlexible.capContinued.lessWrongBut));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.andPotentialSize);
        }];
        [self.twoObserved mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(RedFlexible.quotesStripCreatorCapturingMin);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.andPotentialSize.height);
    }else {
        
        if ([UIDevice putKin]) {
            self.sparseView.layer.cornerRadius = 5.f;
            self.sparseView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.sparseView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(RedFlexible.capContinued.rowDeleteMan);
        }];
        UIImage *plainTagImage = [UIImage detectedSeeExpectsSamplingEndsName:RedFlexible.capContinued.universalPrincipalTouchPhaseDryMap];
        UIImage *twitterImage = [UIImage imageWithCGImage:plainTagImage.CGImage
                                                    scale:plainTagImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.napView.image = twitterImage;
        [self.napView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.sparseView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(RedFlexible.capContinued.lessWrongBut, RedFlexible.capContinued.trapSystolic));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.andPotentialSize);
        }];
        [self.twoObserved mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(RedFlexible.quotesStripCreatorCapturingMin);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.andPotentialSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

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

@end
