






#import "SlowPopPenViewController.h"
#import "LocationsManager.h"
#import "IdiomFitView.h"
#import "UIColor+HisColor.h"
#import "UIDevice+RawDevice.h"
#import "UIImage+OldImage.h"
#import "ArmourHeapConfig.h"

@interface SlowPopPenViewController ()

@property (nonatomic, strong) UIView * illSexView;
@property (nonatomic, strong) UIImageView * wayView;

@end

@implementation SlowPopPenViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = AreStateWon.koreanMagnesiumTransientVowelSlowEpsilon ? [UIColor grantingHomeLowClickedDogCellphone:AreStateWon.koreanMagnesiumTransientVowelSlowEpsilon]:UIColor.whiteColor;

    self.allowLowPen = self.lawBoldSeed;
    [IdiomFitView sawPicker];
    
    self.illSexView = [UIView new];
    self.illSexView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.illSexView];
    
    self.wayView = [[UIImageView alloc] initWithImage:[UIImage bikeSpaceTurnProtocolsPencilName:AreStateWon.twoHoverHard.networkTicketsDetachHaveLaunchYet]];;
    [self.view addSubview:self.wayView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(wrongUseEnds) name:AreStateWon.twoHoverHard.didNowInlandMayUseJapanese object:nil];
}

- (void)wrongUseEnds {
    [self.lenientMile reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([AreStateWon prematureFutureDispensePrepareSummaryName] && ArmourHeapConfig.shared.hueBypassedBoldfaceTradEmpty.stoneSigner.maleGeneral) {
        [IdiomFitView reduction];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)sockReceiverSize {
    if ([UIDevice tooRet]) {
        return CGSizeMake(AreStateWon.brotherSliderProvinceSumHas, AreStateWon.brotherSliderProvinceSumHas);
    }
    UIWindow *triggerWindow = [[LocationsManager shared] hasPeakThickWindow];
    UIEdgeInsets safe = triggerWindow.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 starting]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, AreStateWon.brotherSliderProvinceSumHas);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, AreStateWon.brotherSliderProvinceSumHas + safe.bottom);
    }else {
        if (![UIDevice starting]) {
            return CGSizeMake(AreStateWon.brotherSliderProvinceSumHas,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(AreStateWon.brotherSliderProvinceSumHas + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(AreStateWon.brotherSliderProvinceSumHas + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)faeroeseGesturesHasOxygenExcluded {
    UIWindow *triggerWindow = [[LocationsManager shared] hasPeakThickWindow];
    UIEdgeInsets safe = triggerWindow.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 tooRet]) {
            self.illSexView.layer.cornerRadius = 5.f;
            self.illSexView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.illSexView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(AreStateWon.twoHoverHard.knowShapeSay);
        }];
        [self.wayView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.illSexView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(AreStateWon.twoHoverHard.dolbyMenFade, AreStateWon.twoHoverHard.bothThreeWas));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.sockReceiverSize);
        }];
        [self.lenientMile mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(AreStateWon.brotherSliderProvinceSumHas);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.sockReceiverSize.height);
    }else {
        
        if ([UIDevice tooRet]) {
            self.illSexView.layer.cornerRadius = 5.f;
            self.illSexView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.illSexView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(AreStateWon.twoHoverHard.knowShapeSay);
        }];
        UIImage *jumpHeadImage = [UIImage bikeSpaceTurnProtocolsPencilName:AreStateWon.twoHoverHard.networkTicketsDetachHaveLaunchYet];
        UIImage *segmentImage = [UIImage imageWithCGImage:jumpHeadImage.CGImage
                                                    scale:jumpHeadImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.wayView.image = segmentImage;
        [self.wayView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.illSexView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(AreStateWon.twoHoverHard.bothThreeWas, AreStateWon.twoHoverHard.dolbyMenFade));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.sockReceiverSize);
        }];
        [self.lenientMile mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(AreStateWon.brotherSliderProvinceSumHas);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.sockReceiverSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

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

@end
