






#import "FirstUsageViewController.h"
#import "KeysVoiceManager.h"
#import "TertiaryView.h"
#import "UIColor+RetColor.h"
#import "UIDevice+WaxDevice.h"
#import "UIImage+GetImage.h"
#import "RedoTabFarConfig.h"

@interface FirstUsageViewController ()

@property (nonatomic, strong) UIView * repairView;
@property (nonatomic, strong) UIImageView * mixView;

@end

@implementation FirstUsageViewController

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

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = SubBondFour.permuteIllInferThiaminUnderStay ? [UIColor handlingNoiseAbortMinimalExposeSentences:SubBondFour.permuteIllInferThiaminUnderStay]:UIColor.whiteColor;

    self.nowWetUpper = self.panoramaEra;
    [TertiaryView errorFeat];
    
    self.repairView = [UIView new];
    self.repairView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:self.repairView];
    
    self.mixView = [[UIImageView alloc] initWithImage:[UIImage positionOwnMeteringSourcesBookName:SubBondFour.nodeFourteen.consumedAvailableSigmoidReliableSwappedSpeak]];;
    [self.view addSubview:self.mixView];
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(entriesOwner) name:SubBondFour.nodeFourteen.deviceZoomMusicOddEighteenWeighted object:nil];
}

- (void)entriesOwner {
    [self.mustMusical reload];
}

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

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


//}

-(void)viewWillDisappear:(BOOL)animated {
    if ([SubBondFour peakMalayCapDelayTwistName] && RedoTabFarConfig.shared.striationEscapingManualSelectedStarting.jouleExpert.goldenDepth) {
        [TertiaryView boyfriend];
    }
    [super viewWillDisappear:animated];
    
}

- (CGSize)drumManagersSize {
    if ([UIDevice undone]) {
        return CGSizeMake(SubBondFour.flashPhonogramAffectedHurricaneCatalan, SubBondFour.flashPhonogramAffectedHurricaneCatalan);
    }
    UIWindow *lessAskWindow = [[KeysVoiceManager shared] kilobitsClipWindow];
    UIEdgeInsets safe = lessAskWindow.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 mayStill]) {
            return CGSizeMake(UIScreen.mainScreen.bounds.size.width, SubBondFour.flashPhonogramAffectedHurricaneCatalan);
        }
        return CGSizeMake(UIScreen.mainScreen.bounds.size.width, SubBondFour.flashPhonogramAffectedHurricaneCatalan + safe.bottom);
    }else {
        if (![UIDevice mayStill]) {
            return CGSizeMake(SubBondFour.flashPhonogramAffectedHurricaneCatalan,UIScreen.mainScreen.bounds.size.height);
        }
        if (orientation == UIInterfaceOrientationLandscapeRight) {
            return CGSizeMake(SubBondFour.flashPhonogramAffectedHurricaneCatalan + safe.left,UIScreen.mainScreen.bounds.size.height);
        }else {
            return CGSizeMake(SubBondFour.flashPhonogramAffectedHurricaneCatalan + 5,UIScreen.mainScreen.bounds.size.height);
        }
    }
}

- (void)renderExclusionSegmentedMusicSymptom {
    UIWindow *lessAskWindow = [[KeysVoiceManager shared] kilobitsClipWindow];
    UIEdgeInsets safe = lessAskWindow.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 undone]) {
            self.repairView.layer.cornerRadius = 5.f;
            self.repairView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
        }
        [self.repairView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view.mas_top);
            make.left.right.equalTo(self.view);
            make.height.mas_equalTo(SubBondFour.nodeFourteen.potassiumTop);
        }];
        [self.mixView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.repairView.mas_top);
            make.centerX.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(SubBondFour.nodeFourteen.resetSiteIts, SubBondFour.nodeFourteen.qualityTeeth));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerX.bottom.mas_equalTo(0);
            make.size.mas_equalTo(self.drumManagersSize);
        }];
        [self.mustMusical mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.mas_equalTo(0);
            make.height.mas_equalTo(SubBondFour.flashPhonogramAffectedHurricaneCatalan);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(0, self.drumManagersSize.height);
    }else {
        
        if ([UIDevice undone]) {
            self.repairView.layer.cornerRadius = 5.f;
            self.repairView.layer.maskedCorners = kCALayerMaxXMaxYCorner | kCALayerMaxXMinYCorner;
        }
        [self.repairView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.view.mas_right);
            make.top.bottom.equalTo(self.view);
            make.width.mas_equalTo(SubBondFour.nodeFourteen.potassiumTop);
        }];
        UIImage *yetNeverImage = [UIImage positionOwnMeteringSourcesBookName:SubBondFour.nodeFourteen.consumedAvailableSigmoidReliableSwappedSpeak];
        UIImage *carThinImage = [UIImage imageWithCGImage:yetNeverImage.CGImage
                                                    scale:yetNeverImage.scale
                                              orientation:UIImageOrientationRight]; 
        self.mixView.image = carThinImage;
        [self.mixView mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.repairView.mas_right);
            make.centerY.equalTo(self.view);
            make.size.mas_equalTo(CGSizeMake(SubBondFour.nodeFourteen.qualityTeeth, SubBondFour.nodeFourteen.resetSiteIts));
        }];
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(0);
            make.size.mas_equalTo(self.drumManagersSize);
        }];
        [self.mustMusical mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.right.mas_equalTo(0);
            make.width.mas_equalTo(SubBondFour.flashPhonogramAffectedHurricaneCatalan);
        }];
        self.view.transform = CGAffineTransformMakeTranslation(-self.drumManagersSize.width, 0);
    }
    [UIView animateWithDuration:0.3 animations:^{
        self.view.transform = CGAffineTransformIdentity;
    }];
}

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

@end
