






#import "PeakConsoleViewController.h"
#import "SDWebImageManager.h"
#import "CutToast.h"
#import "NSString+OutBypass.h"

@interface PeakConsoleViewController ()

@property (nonatomic, strong) UIImageView *priceKinOurImageView;
@property (nonatomic, strong) UITextField *disappearTextField;
@property (nonatomic, strong) UITextField *rainEpsilonTextField;

@end

@implementation PeakConsoleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.openCatArmButton.hidden = [self.boldInfoTip[0] boolValue];
    
    CGFloat heartbeatListNowPromotionSemantics = BinTopLemma.drainCatFair.chestDryLost;
    
    UILabel *topLabel = [BinTopLemma wasCentralsSharingFunPrompt:BinTopLemma.oldHitDownIron.creamyMixProgramShortcutsCutter];
    topLabel.numberOfLines = 0;
    [self.view addSubview:topLabel];
    [topLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BinTopLemma.drainCatFair.suggestBlock);
        make.left.mas_equalTo(BinTopLemma.drainCatFair.nameAdvances);
        make.right.mas_equalTo(-BinTopLemma.drainCatFair.nameAdvances);
    }];
    
    
    self.disappearTextField = [BinTopLemma offStaleHowField:BinTopLemma.oldHitDownIron.mostlyIndigoPhraseOnlyThemeMegabytes isSecure:NO];
    [self.view addSubview:self.disappearTextField];
    [self.disappearTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(topLabel.mas_bottom).offset(heartbeatListNowPromotionSemantics);
        make.left.mas_equalTo(BinTopLemma.drainCatFair.ownPedometer);
        make.right.mas_equalTo(-BinTopLemma.drainCatFair.ownPedometer);
        make.height.mas_equalTo(BinTopLemma.drainCatFair.outerMaximum);
    }];
    
    
    self.rainEpsilonTextField = [BinTopLemma offStaleHowField:BinTopLemma.oldHitDownIron.vignetteAscendingCancelsWeekWaxRequested isSecure:NO];;
    [self.view addSubview:self.rainEpsilonTextField];
    [self.rainEpsilonTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.disappearTextField.mas_bottom).offset(heartbeatListNowPromotionSemantics);
        make.left.right.equalTo(self.disappearTextField);
        make.height.mas_equalTo(BinTopLemma.drainCatFair.outerMaximum);
    }];
    
    
    UIImageView *metricImageView = nil;
    if ([self.boldInfoTip[1] length] > 0) {
        
        metricImageView = [[UIImageView alloc] init];
        metricImageView.backgroundColor = UIColor.lightGrayColor;
        metricImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:metricImageView];
        [metricImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.rainEpsilonTextField.mas_bottom).offset(heartbeatListNowPromotionSemantics);
            make.width.mas_equalTo(self.rainEpsilonTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.priceKinOurImageView = metricImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.boldInfoTip[1]] options:0 progress:nil completed:^(UIImage * _Nullable image2, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
            dispatch_async(dispatch_get_main_queue(), ^{
                metricImageView.image = image2;
                CGFloat ratio = image2.size.height / image2.size.width;
                [metricImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((BinTopLemma.drainCatFair.extendingOpacityDatabasesHomeCheckWidth -BinTopLemma.drainCatFair.ownPedometer*2)*ratio);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.priceKinOurImageView ? self.priceKinOurImageView.frame.size.height + BinTopLemma.drainCatFair.chestDryLost +BinTopLemma.drainCatFair.canonicalSpaDryPongPutGenre : BinTopLemma.drainCatFair.canonicalSpaDryPongPutGenre;
                    
                    make.size.mas_equalTo(CGSizeMake(BinTopLemma.drainCatFair.extendingOpacityDatabasesHomeCheckWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.priceKinOurImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.priceKinOurImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *oneAnchorButton = [BinTopLemma tipSwahiliOutletTailCurrentlyColor:BinTopLemma.oldHitDownIron.weeklySubmitExchangesHertzSender];
    [oneAnchorButton addTarget:self action:@selector(discardedPeriodMillSoccerFixPress:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:oneAnchorButton];
    [oneAnchorButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-BinTopLemma.drainCatFair.napSurgeRare);
        make.left.right.equalTo(self.disappearTextField);
        make.height.mas_equalTo(BinTopLemma.drainCatFair.clipSeeBegin);
    }];
    
}

- (void)discardedPeriodMillSoccerFixPress:(id)sender {
if (self.disappearTextField.text.faxNoteRetry || self.rainEpsilonTextField.text.faxNoteRetry) {
        [NowAlertView prominentGoldenProfilesTropicalPivotViolation:BinTopLemma.oldHitDownIron.penHigher message:BinTopLemma.oldHitDownIron.redoneSixDrivenArcadeFindIts completion:nil];
        return;
    }
    if ([self.fixLimitCocoa respondsToSelector:@selector(fatUnlockDogOutletStackFingerWithName:sixDry:completion:)]) {
        [NextIllKeyView italianFormatWindow];
        [self.fixLimitCocoa fatUnlockDogOutletStackFingerWithName:self.disappearTextField.text sixDry:self.rainEpsilonTextField.text completion:^(id object) {
            [NextIllKeyView legibleSecondaryResponseDelayMediaWindow];
            if ([object boolValue]) {
                [[ChunkyGetManager shared] airOverwriteWindow];
                [CutToast browseCrop:BinTopLemma.oldHitDownIron.ageArtistSlantAutoOrdinalFunk];
            }
        }];
    }
}

@end
