






#import "LookLaotianViewController.h"
#import "SDWebImageManager.h"
#import "FixToast.h"
#import "NSString+SeedLabel.h"

@interface LookLaotianViewController ()

@property (nonatomic, strong) UIImageView *outChlorideImageView;
@property (nonatomic, strong) UITextField *winSerialTextField;
@property (nonatomic, strong) UITextField *faxHumanRowTextField;

@end

@implementation LookLaotianViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.veryCarMapButton.hidden = [self.discreteTry[0] boolValue];
    
    CGFloat everyTelephotoLogicalVectorSelf = RaceRateYou.wristBoldNot.featMixTrial;
    
    UILabel *addLabel = [RaceRateYou upperWebpagePhonogramTimeHow:RaceRateYou.maxSnapYearShe.lateRenderTomorrowEvaluatedPersist];
    addLabel.numberOfLines = 0;
    [self.view addSubview:addLabel];
    [addLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(RaceRateYou.wristBoldNot.deliverBrief);
        make.left.mas_equalTo(RaceRateYou.wristBoldNot.charAlbumOur);
        make.right.mas_equalTo(-RaceRateYou.wristBoldNot.charAlbumOur);
    }];
    
    
    self.winSerialTextField = [RaceRateYou crossFunWhoField:RaceRateYou.maxSnapYearShe.kurdishRestoreConvergedCompressProgramTwenty isSecure:NO];
    [self.view addSubview:self.winSerialTextField];
    [self.winSerialTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(addLabel.mas_bottom).offset(everyTelephotoLogicalVectorSelf);
        make.left.mas_equalTo(RaceRateYou.wristBoldNot.hisDirection);
        make.right.mas_equalTo(-RaceRateYou.wristBoldNot.hisDirection);
        make.height.mas_equalTo(RaceRateYou.wristBoldNot.slopeLoseAny);
    }];
    
    
    self.faxHumanRowTextField = [RaceRateYou crossFunWhoField:RaceRateYou.maxSnapYearShe.tonePetabytesFilteredRevisionsCollectedBleed isSecure:NO];;
    [self.view addSubview:self.faxHumanRowTextField];
    [self.faxHumanRowTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.winSerialTextField.mas_bottom).offset(everyTelephotoLogicalVectorSelf);
        make.left.right.equalTo(self.winSerialTextField);
        make.height.mas_equalTo(RaceRateYou.wristBoldNot.slopeLoseAny);
    }];
    
    
    UIImageView *sobBarImageView = nil;
    if ([self.discreteTry[1] length] > 0) {
        
        sobBarImageView = [[UIImageView alloc] init];
        sobBarImageView.backgroundColor = UIColor.lightGrayColor;
        sobBarImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:sobBarImageView];
        [sobBarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.faxHumanRowTextField.mas_bottom).offset(everyTelephotoLogicalVectorSelf);
            make.width.mas_equalTo(self.faxHumanRowTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.outChlorideImageView = sobBarImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.discreteTry[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(), ^{
                sobBarImageView.image = image2;
                CGFloat batch = image2.size.height / image2.size.width;
                [sobBarImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((RaceRateYou.wristBoldNot.sleepCropUnlimitedGreenUniformWidth -RaceRateYou.wristBoldNot.hisDirection*2)*batch);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.outChlorideImageView ? self.outChlorideImageView.frame.size.height + RaceRateYou.wristBoldNot.featMixTrial +RaceRateYou.wristBoldNot.followRatingsEvaluatedAscentSurgeRecord : RaceRateYou.wristBoldNot.followRatingsEvaluatedAscentSurgeRecord;
                    
                    make.size.mas_equalTo(CGSizeMake(RaceRateYou.wristBoldNot.sleepCropUnlimitedGreenUniformWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.outChlorideImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.outChlorideImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *airSexualButton = [RaceRateYou songLawWelshTriggerAlcoholColor:RaceRateYou.maxSnapYearShe.moleMongolianGlyphPointTerabytes];
    [airSexualButton addTarget:self action:@selector(lappishChunkDidCollisionCancelCurrency:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:airSexualButton];
    [airSexualButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-RaceRateYou.wristBoldNot.tryFileDaily);
        make.left.right.equalTo(self.winSerialTextField);
        make.height.mas_equalTo(RaceRateYou.wristBoldNot.lettersEmail);
    }];
    
}

- (void)lappishChunkDidCollisionCancelCurrency:(id)sender {
if (self.winSerialTextField.text.mouseSegment || self.faxHumanRowTextField.text.mouseSegment) {
        [AddAlertView membersDeclinedSlideSobProcessesPlug:RaceRateYou.maxSnapYearShe.trapLight message:RaceRateYou.maxSnapYearShe.hairListPositiveTagsQualityIcelandic completion:nil];
        return;
    }
    if ([self.alarmEditUnit respondsToSelector:@selector(synthesisDependentCellphoneDetachingShortBlockWithName:simple:completion:)]) {
        [WarpHexOurView uploadingNeedWindow];
        [self.alarmEditUnit synthesisDependentCellphoneDetachingShortBlockWithName:self.winSerialTextField.text simple:self.faxHumanRowTextField.text completion:^(id object) {
            [WarpHexOurView bondKashmiriAfterAllergyPushWindow];
            if ([object boolValue]) {
                [[SeparatedManager shared] sessionRenewWindow];
                [FixToast equalPhoto:RaceRateYou.maxSnapYearShe.relationLegalSumDropLoseIron];
            }
        }];
    }
}

@end
