






#import "SlopePascalViewController.h"
#import "SDWebImageManager.h"
#import "SinToast.h"
#import "NSString+FinalFast.h"

@interface SlopePascalViewController ()

@property (nonatomic, strong) UIImageView *getVarianceImageView;
@property (nonatomic, strong) UITextField *edgeSleetTextField;
@property (nonatomic, strong) UITextField *walkOutLostTextField;

@end

@implementation SlopePascalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.retMileItsButton.hidden = [self.netMetadata[0] boolValue];
    
    CGFloat treeHeapLongerEggPointer = BounceBrief.cropSobCanon.capUnwindKit;
    
    UILabel *twoLabel = [BounceBrief dayPrettyArtDiscountsMin:BounceBrief.airDigitSobSee.insertChecksumQuitOurReady];
    twoLabel.numberOfLines = 0;
    [self.view addSubview:twoLabel];
    [twoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BounceBrief.cropSobCanon.artSpaString);
        make.left.mas_equalTo(BounceBrief.cropSobCanon.plainPlayAsk);
        make.right.mas_equalTo(-BounceBrief.cropSobCanon.plainPlayAsk);
    }];
    
    
    self.edgeSleetTextField = [BounceBrief integralOurField:BounceBrief.airDigitSobSee.sumCrossComplexShadowMayLast isSecure:NO];
    [self.view addSubview:self.edgeSleetTextField];
    [self.edgeSleetTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(twoLabel.mas_bottom).offset(treeHeapLongerEggPointer);
        make.left.mas_equalTo(BounceBrief.cropSobCanon.winOneSignal);
        make.right.mas_equalTo(-BounceBrief.cropSobCanon.winOneSignal);
        make.height.mas_equalTo(BounceBrief.cropSobCanon.herFeetMouth);
    }];
    
    
    self.walkOutLostTextField = [BounceBrief integralOurField:BounceBrief.airDigitSobSee.clusterDesiredParentalReceivesSobShelf isSecure:NO];;
    [self.view addSubview:self.walkOutLostTextField];
    [self.walkOutLostTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.edgeSleetTextField.mas_bottom).offset(treeHeapLongerEggPointer);
        make.left.right.equalTo(self.edgeSleetTextField);
        make.height.mas_equalTo(BounceBrief.cropSobCanon.herFeetMouth);
    }];
    
    
    UIImageView *resumeImageView = nil;
    if ([self.netMetadata[1] length] > 0) {
        
        resumeImageView = [[UIImageView alloc] init];
        resumeImageView.backgroundColor = UIColor.lightGrayColor;
        resumeImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:resumeImageView];
        [resumeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.walkOutLostTextField.mas_bottom).offset(treeHeapLongerEggPointer);
            make.width.mas_equalTo(self.walkOutLostTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.getVarianceImageView = resumeImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.netMetadata[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(), ^{
                resumeImageView.image = image2;
                CGFloat brown = image2.size.height / image2.size.width;
                [resumeImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((BounceBrief.cropSobCanon.deviceWhileJustMustEraWidth -BounceBrief.cropSobCanon.winOneSignal*2)*brown);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.getVarianceImageView ? self.getVarianceImageView.frame.size.height + BounceBrief.cropSobCanon.capUnwindKit +BounceBrief.cropSobCanon.sonBoxAcceptingRareGramCard : BounceBrief.cropSobCanon.sonBoxAcceptingRareGramCard;
                    
                    make.size.mas_equalTo(CGSizeMake(BounceBrief.cropSobCanon.deviceWhileJustMustEraWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.getVarianceImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.getVarianceImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *kilobytesButton = [BounceBrief followHoursWristSecondCaseColor:BounceBrief.airDigitSobSee.scannedNearPeerReceivedTall];
    [kilobytesButton addTarget:self action:@selector(visitedElementIndexDogAxialEnable:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:kilobytesButton];
    [kilobytesButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-BounceBrief.cropSobCanon.sobActionRed);
        make.left.right.equalTo(self.edgeSleetTextField);
        make.height.mas_equalTo(BounceBrief.cropSobCanon.nepaliBagRed);
    }];
    
}

- (void)visitedElementIndexDogAxialEnable:(id)sender {
if (self.edgeSleetTextField.text.showReversed || self.walkOutLostTextField.text.showReversed) {
        [TenAlertView hisUndefinedInsertBehaviorsGeneralAccessed:BounceBrief.airDigitSobSee.tempNorth message:BounceBrief.airDigitSobSee.listenerCupRequestedAudiogramLandscapePolicies completion:nil];
        return;
    }
    if ([self.scaleMealPing respondsToSelector:@selector(waxPassStampDecodingCalciumMoodWithName:youCut:completion:)]) {
        [MeterBrandView sceneAdvancesWindow];
        [self.scaleMealPing waxPassStampDecodingCalciumMoodWithName:self.edgeSleetTextField.text youCut:self.walkOutLostTextField.text completion:^(id object) {
            [MeterBrandView depthUnsafeAggregateCenteredAirWindow];
            if ([object boolValue]) {
                [[RecordingManager shared] logSetupPintWindow];
                [SinToast priorStack:BounceBrief.airDigitSobSee.exchangesMapPointerSaySongBridging];
            }
        }];
    }
}

@end
