






#import "AppliesDogViewController.h"
#import "VortexBusManager.h"
#import "LocationView.h"
#import "UIColor+RunColor.h"
#import "UIDevice+WinDevice.h"
#import "UIImage+OptImage.h"
#import "WetSymbolsConfig.h"

@interface AppliesDogViewController ()

@property (nonatomic, strong) UIView * badSheView;
@property (nonatomic, strong) UIImageView * armView;

@end

@implementation AppliesDogViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = MainMinimal.charDownloadsNominallyNowTamilQuotes ? [UIColor farsiProcessFeaturesSmoothingRotatingSix:MainMinimal.charDownloadsNominallyNowTamilQuotes]:UIColor.whiteColor;

    self.cornersPack = self.freeKinDark;
    [LocationView betterWet];
    
    self.badSheView = [UIView new];
    self.badSheView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.badSheView];
    
    self.armView = [[UIImageView alloc] initWithImage:[UIImage volumesSerialNearestContextCreatedName:MainMinimal.nordicPubTen.trackYardPlayLibraryIntroCurrency]];;
    [self.view addSubview:self.armView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(brownPersist) name:MainMinimal.nordicPubTen.descendLinkageQueueEggWinExec object:nil];
}

- (void)brownPersist {
    [self.lossBoxChat reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([MainMinimal headphoneAcrossMainSayPeakName] && WetSymbolsConfig.shared.tempPortionTokenBoostStroked.mapOrderDay.herFileExec) {
        [LocationView subRemote];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)hashClampButSize {
    if ([UIDevice kinOdd]) {
        return CGSizeMake(MainMinimal.footersCyclingChallengeProducingFriction, MainMinimal.footersCyclingChallengeProducingFriction);
    }
    UIWindow *mindfulWindow = [[VortexBusManager shared] broadcastOptWindow];
    UIEdgeInsets safe = mindfulWindow.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 overhang]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, MainMinimal.footersCyclingChallengeProducingFriction);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, MainMinimal.footersCyclingChallengeProducingFriction + safe.bottom);
    }else {
        if (![UIDevice overhang]) {
            return CGSizeMake(MainMinimal.footersCyclingChallengeProducingFriction,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(MainMinimal.footersCyclingChallengeProducingFriction + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(MainMinimal.footersCyclingChallengeProducingFriction + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)chargingWalkCollisionCentersNautical {
    UIWindow *mindfulWindow = [[VortexBusManager shared] broadcastOptWindow];
    UIEdgeInsets safe = mindfulWindow.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 kinOdd]) {
            self.badSheView.layer.cornerRadius = 5.f;
            self.badSheView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.badSheView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(MainMinimal.nordicPubTen.metricFolder);
        }];
        [self.armView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.badSheView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(MainMinimal.nordicPubTen.stillChapter, MainMinimal.nordicPubTen.lateNautical));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.hashClampButSize);
        }];
        [self.lossBoxChat mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(MainMinimal.footersCyclingChallengeProducingFriction);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.hashClampButSize.height);
    }else {
        
        if ([UIDevice kinOdd]) {
            self.badSheView.layer.cornerRadius = 5.f;
            self.badSheView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.badSheView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(MainMinimal.nordicPubTen.metricFolder);
        }];
        UIImage *netLargeImage = [UIImage volumesSerialNearestContextCreatedName:MainMinimal.nordicPubTen.trackYardPlayLibraryIntroCurrency];
        UIImage *beatSinImage = [UIImage imageWithCGImage:netLargeImage.CGImage
                                                    scale:netLargeImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.armView.image = beatSinImage;
        [self.armView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.badSheView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(MainMinimal.nordicPubTen.lateNautical, MainMinimal.nordicPubTen.stillChapter));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.hashClampButSize);
        }];
        [self.lossBoxChat mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(MainMinimal.footersCyclingChallengeProducingFriction);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.hashClampButSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

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

@end
