






#import "TerminalHasViewController.h"
#import "SDWebImageManager.h"
#import "PubToast.h"
#import "NSString+ExternYet.h"

@interface TerminalHasViewController ()

@property (nonatomic, strong) UIImageView *manMixFiberImageView;
@property (nonatomic, strong) UITextField *pongDirtyTextField;
@property (nonatomic, strong) UITextField *curlBridgedTextField;

@end

@implementation TerminalHasViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.fitFunLeadButton.hidden = [self.assertCross[0] boolValue];
    
    CGFloat romanPrecisionDigitalShowersLoading = MapSheFocus.ownerQuality.airPulseFeed;
    
    UILabel *pinLabel = [MapSheFocus distinctObscuredFractionsGetWeekend:MapSheFocus.catBlackPopMay.alertPongChestBiotinProvide];
    pinLabel.numberOfLines = 0;
    [self.view addSubview:pinLabel];
    [pinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MapSheFocus.ownerQuality.solveFailing);
        make.left.mas_equalTo(MapSheFocus.ownerQuality.andMillibars);
        make.right.mas_equalTo(-MapSheFocus.ownerQuality.andMillibars);
    }];
    
    
    self.pongDirtyTextField = [MapSheFocus zoomInviteeField:MapSheFocus.catBlackPopMay.daysGuestBlobCornerZipHormone isSecure:NO];
    [self.view addSubview:self.pongDirtyTextField];
    [self.pongDirtyTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(pinLabel.mas_bottom).offset(romanPrecisionDigitalShowersLoading);
        make.left.mas_equalTo(MapSheFocus.ownerQuality.sinkHasAdopt);
        make.right.mas_equalTo(-MapSheFocus.ownerQuality.sinkHasAdopt);
        make.height.mas_equalTo(MapSheFocus.ownerQuality.headerPrefix);
    }];
    
    
    self.curlBridgedTextField = [MapSheFocus zoomInviteeField:MapSheFocus.catBlackPopMay.promptSawUighurIgnoresDifferentAffinity isSecure:NO];;
    [self.view addSubview:self.curlBridgedTextField];
    [self.curlBridgedTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.pongDirtyTextField.mas_bottom).offset(romanPrecisionDigitalShowersLoading);
        make.left.right.equalTo(self.pongDirtyTextField);
        make.height.mas_equalTo(MapSheFocus.ownerQuality.headerPrefix);
    }];
    
    
    UIImageView *reduceImageView = nil;
    if ([self.assertCross[1] length] > 0) {
        
        reduceImageView = [[UIImageView alloc] init];
        reduceImageView.backgroundColor = UIColor.lightGrayColor;
        reduceImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:reduceImageView];
        [reduceImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.curlBridgedTextField.mas_bottom).offset(romanPrecisionDigitalShowersLoading);
            make.width.mas_equalTo(self.curlBridgedTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.manMixFiberImageView = reduceImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.assertCross[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(), ^{
                reduceImageView.image = image2;
                CGFloat media = image2.size.height / image2.size.width;
                [reduceImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((MapSheFocus.ownerQuality.alienIntegralTrustRootDueWidth -MapSheFocus.ownerQuality.sinkHasAdopt*2)*media);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.manMixFiberImageView ? self.manMixFiberImageView.frame.size.height + MapSheFocus.ownerQuality.airPulseFeed +MapSheFocus.ownerQuality.appearWeightedExpandingExecutingDisablePrepare : MapSheFocus.ownerQuality.appearWeightedExpandingExecutingDisablePrepare;
                    
                    make.size.mas_equalTo(CGSizeMake(MapSheFocus.ownerQuality.alienIntegralTrustRootDueWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.manMixFiberImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.manMixFiberImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *lateChainButton = [MapSheFocus zipPinchGlobalCalorieInferColor:MapSheFocus.catBlackPopMay.proceedAchievedSessionsHundredClosest];
    [lateChainButton addTarget:self action:@selector(popVersionsLowercaseSizeLayerMin:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:lateChainButton];
    [lateChainButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-MapSheFocus.ownerQuality.syntaxNotAre);
        make.left.right.equalTo(self.pongDirtyTextField);
        make.height.mas_equalTo(MapSheFocus.ownerQuality.penWindowIts);
    }];
    
}

- (void)popVersionsLowercaseSizeLayerMin:(id)sender {

}

@end
