






#import "EqualityWasViewController.h"
#import "SDWebImageManager.h"
#import "DryToast.h"
#import "NSString+ExpandNot.h"

@interface EqualityWasViewController ()

@property (nonatomic, strong) UIImageView *maxLeapRedoImageView;
@property (nonatomic, strong) UITextField *newsstandTextField;
@property (nonatomic, strong) UITextField *ageLongZoomTextField;

@end

@implementation EqualityWasViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.opaqueHalfButton.hidden = [self.eyeLostSink[0] boolValue];
    
    CGFloat combineTimeScanResignTouches = AlbumBoxSex.catalanHertz.workVoiceOff;
    
    UILabel *penLabel = [AlbumBoxSex hitLiveShowersKannadaAir:AlbumBoxSex.topWaxTreeRole.workUniformEchoSeekTruncates];
    penLabel.numberOfLines = 0;
    [self.view addSubview:penLabel];
    [penLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(AlbumBoxSex.catalanHertz.catFullYears);
        make.left.mas_equalTo(AlbumBoxSex.catalanHertz.resetSpaLast);
        make.right.mas_equalTo(-AlbumBoxSex.catalanHertz.resetSpaLast);
    }];
    
    
    self.newsstandTextField = [AlbumBoxSex restMapCardField:AlbumBoxSex.topWaxTreeRole.hertzCatalogOnlyShipmentStairOutline isSecure:NO];
    [self.view addSubview:self.newsstandTextField];
    [self.newsstandTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(penLabel.mas_bottom).offset(combineTimeScanResignTouches);
        make.left.mas_equalTo(AlbumBoxSex.catalanHertz.editorForHex);
        make.right.mas_equalTo(-AlbumBoxSex.catalanHertz.editorForHex);
        make.height.mas_equalTo(AlbumBoxSex.catalanHertz.revisionRain);
    }];
    
    
    self.ageLongZoomTextField = [AlbumBoxSex restMapCardField:AlbumBoxSex.topWaxTreeRole.slantSlabFlightTrashHourlyIncrement isSecure:NO];;
    [self.view addSubview:self.ageLongZoomTextField];
    [self.ageLongZoomTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.newsstandTextField.mas_bottom).offset(combineTimeScanResignTouches);
        make.left.right.equalTo(self.newsstandTextField);
        make.height.mas_equalTo(AlbumBoxSex.catalanHertz.revisionRain);
    }];
    
    
    UIImageView *hisFarImageView = nil;
    if ([self.eyeLostSink[1] length] > 0) {
        
        hisFarImageView = [[UIImageView alloc] init];
        hisFarImageView.backgroundColor = UIColor.lightGrayColor;
        hisFarImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:hisFarImageView];
        [hisFarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.ageLongZoomTextField.mas_bottom).offset(combineTimeScanResignTouches);
            make.width.mas_equalTo(self.ageLongZoomTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.maxLeapRedoImageView = hisFarImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.eyeLostSink[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(), ^{
                hisFarImageView.image = image2;
                CGFloat ratio = image2.size.height / image2.size.width;
                [hisFarImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((AlbumBoxSex.catalanHertz.lawBendRareSeedAnnotatedWidth -AlbumBoxSex.catalanHertz.editorForHex*2)*ratio);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.maxLeapRedoImageView ? self.maxLeapRedoImageView.frame.size.height + AlbumBoxSex.catalanHertz.workVoiceOff +AlbumBoxSex.catalanHertz.placeVerticalTrustedOrangeCaseProvider : AlbumBoxSex.catalanHertz.placeVerticalTrustedOrangeCaseProvider;
                    
                    make.size.mas_equalTo(CGSizeMake(AlbumBoxSex.catalanHertz.lawBendRareSeedAnnotatedWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.maxLeapRedoImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.maxLeapRedoImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *resignFaxButton = [AlbumBoxSex managerResultsExistingAscendingDefinedColor:AlbumBoxSex.topWaxTreeRole.duplicateNetscapeSecurelyRollbackSlide];
    [resignFaxButton addTarget:self action:@selector(husbandSupplyAlwaysFunkAirlineKorean:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:resignFaxButton];
    [resignFaxButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-AlbumBoxSex.catalanHertz.armpitNotify);
        make.left.right.equalTo(self.newsstandTextField);
        make.height.mas_equalTo(AlbumBoxSex.catalanHertz.haveThemeAre);
    }];
    
}

- (void)husbandSupplyAlwaysFunkAirlineKorean:(id)sender {
if (self.newsstandTextField.text.pageLiterHow || self.ageLongZoomTextField.text.pageLiterHow) {
        [MaxAlertView pastLawRevisionsProceedSpectralOcean:AlbumBoxSex.topWaxTreeRole.unlimited message:AlbumBoxSex.topWaxTreeRole.scannedStorylinePinkSpeakerCollisionInset completion:nil];
        return;
    }
    if ([self.becomeBankers respondsToSelector:@selector(topLoveCollapsedSalientRecordingMomentaryWithName:ascent:completion:)]) {
        [InsulinJobView footersSignerWindow];
        [self.becomeBankers topLoveCollapsedSalientRecordingMomentaryWithName:self.newsstandTextField.text ascent:self.ageLongZoomTextField.text completion:^(id object) {
            [InsulinJobView preventedSmileBedRunMusicWindow];
            if ([object boolValue]) {
                [[PredicateManager shared] pongDutchCutWindow];
                [DryToast longUptime:AlbumBoxSex.topWaxTreeRole.formatsBalancePackHeightLayeringRedirects];
            }
        }];
    }
}

@end
