






#import "BlobEnergyViewController.h"
#import "ZoneAngleManager.h"
#import "LastDateView.h"
#import "UIColor+RetColor.h"
#import "UIDevice+EraDevice.h"
#import "UIImage+BagImage.h"
#import "DegreeNearConfig.h"

@interface BlobEnergyViewController ()

@property (nonatomic, strong) UIView * artMidView;
@property (nonatomic, strong) UIImageView * theView;

@end

@implementation BlobEnergyViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = ClaimMaxBig.uighurPublishPhaseMetabolicCervicalNeutral ? [UIColor loveWeightsAskMantissaMalayChallenge:ClaimMaxBig.uighurPublishPhaseMetabolicCervicalNeutral]:UIColor.whiteColor;

    self.mindVitamin = self.upscaleDays;
    [LastDateView standHave];
    
    self.artMidView = [UIView new];
    self.artMidView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.artMidView];
    
    self.theView = [[UIImageView alloc] initWithImage:[UIImage earResumeRawOwnFatName:ClaimMaxBig.applierPatch.stylisticRenewalChargingZoomDogGenre]];;
    [self.view addSubview:self.theView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fireNeverOwn) name:ClaimMaxBig.applierPatch.mildSlideMagnesiumClimbedEthernetJob object:nil];
}

- (void)fireNeverOwn {
    [self.topLeakyTen reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([ClaimMaxBig paceBannerDailyEdgaTatarName] && DegreeNearConfig.shared.outDepthDecimalNetLaunching.slidingNeed.certRelated) {
        [LastDateView currently];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)acceptingPubSize {
    if ([UIDevice seeTop]) {
        return CGSizeMake(ClaimMaxBig.icyPressesMuteMainRound, ClaimMaxBig.icyPressesMuteMainRound);
    }
    UIWindow *patientWindow = [[ZoneAngleManager shared] retGigabytesWindow];
    UIEdgeInsets safe = patientWindow.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 underEar]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, ClaimMaxBig.icyPressesMuteMainRound);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, ClaimMaxBig.icyPressesMuteMainRound + safe.bottom);
    }else {
        if (![UIDevice underEar]) {
            return CGSizeMake(ClaimMaxBig.icyPressesMuteMainRound,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(ClaimMaxBig.icyPressesMuteMainRound + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(ClaimMaxBig.icyPressesMuteMainRound + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)consumesSmallerGopherDatumGuration {
    UIWindow *patientWindow = [[ZoneAngleManager shared] retGigabytesWindow];
    UIEdgeInsets safe = patientWindow.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 seeTop]) {
            self.artMidView.layer.cornerRadius = 5.f;
            self.artMidView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.artMidView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(ClaimMaxBig.applierPatch.turnHeadline);
        }];
        [self.theView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.artMidView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(ClaimMaxBig.applierPatch.tintLeakyShe, ClaimMaxBig.applierPatch.towerComplex));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.acceptingPubSize);
        }];
        [self.topLeakyTen mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(ClaimMaxBig.icyPressesMuteMainRound);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.acceptingPubSize.height);
    }else {
        
        if ([UIDevice seeTop]) {
            self.artMidView.layer.cornerRadius = 5.f;
            self.artMidView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.artMidView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(ClaimMaxBig.applierPatch.turnHeadline);
        }];
        UIImage *askInterImage = [UIImage earResumeRawOwnFatName:ClaimMaxBig.applierPatch.stylisticRenewalChargingZoomDogGenre];
        UIImage *zoomTooImage = [UIImage imageWithCGImage:askInterImage.CGImage
                                                    scale:askInterImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.theView.image = zoomTooImage;
        [self.theView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.artMidView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(ClaimMaxBig.applierPatch.towerComplex, ClaimMaxBig.applierPatch.tintLeakyShe));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.acceptingPubSize);
        }];
        [self.topLeakyTen mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(ClaimMaxBig.icyPressesMuteMainRound);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.acceptingPubSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

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

@end
