






#import "ManyOperandViewController.h"
#import "SDWebImageManager.h"
#import "AnyToast.h"
#import "NSString+ReplyMill.h"

@interface ManyOperandViewController ()

@property (nonatomic, strong) UIImageView *fixFootballImageView;
@property (nonatomic, strong) UITextField *tooGenderTextField;
@property (nonatomic, strong) UITextField *performsOwnTextField;

@end

@implementation ManyOperandViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.halfWayPopButton.hidden = [self.groupedSink[0] boolValue];
    
    CGFloat activeFlightStalledHexColored = ZipRestThat.heartHowLead.zeroChecksum;
    
    UILabel *lowLabel = [ZipRestThat howHitWhoUploadingSuch:ZipRestThat.useCatAliveLow.shapeTrainerHoldEditorialRelations];
    lowLabel.numberOfLines = 0;
    [self.view addSubview:lowLabel];
    [lowLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ZipRestThat.heartHowLead.missingClamp);
        make.left.mas_equalTo(ZipRestThat.heartHowLead.twoAdjustOwn);
        make.right.mas_equalTo(-ZipRestThat.heartHowLead.twoAdjustOwn);
    }];
    
    
    self.tooGenderTextField = [ZipRestThat polarTagFitField:ZipRestThat.useCatAliveLow.millibarsHectaresArtSectionsWillBus isSecure:NO];
    [self.view addSubview:self.tooGenderTextField];
    [self.tooGenderTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lowLabel.mas_bottom).offset(activeFlightStalledHexColored);
        make.left.mas_equalTo(ZipRestThat.heartHowLead.dirtyButMute);
        make.right.mas_equalTo(-ZipRestThat.heartHowLead.dirtyButMute);
        make.height.mas_equalTo(ZipRestThat.heartHowLead.tabMatrixYet);
    }];
    
    
    self.performsOwnTextField = [ZipRestThat polarTagFitField:ZipRestThat.useCatAliveLow.indexNicknamePutBlurLambdaLive isSecure:NO];;
    [self.view addSubview:self.performsOwnTextField];
    [self.performsOwnTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tooGenderTextField.mas_bottom).offset(activeFlightStalledHexColored);
        make.left.right.equalTo(self.tooGenderTextField);
        make.height.mas_equalTo(ZipRestThat.heartHowLead.tabMatrixYet);
    }];
    
    
    UIImageView *netZipImageView = nil;
    if ([self.groupedSink[1] length] > 0) {
        
        netZipImageView = [[UIImageView alloc] init];
        netZipImageView.backgroundColor = UIColor.lightGrayColor;
        netZipImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:netZipImageView];
        [netZipImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.performsOwnTextField.mas_bottom).offset(activeFlightStalledHexColored);
            make.width.mas_equalTo(self.performsOwnTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.fixFootballImageView = netZipImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.groupedSink[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(), ^{
                netZipImageView.image = image2;
                CGFloat pinch = image2.size.height / image2.size.width;
                [netZipImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((ZipRestThat.heartHowLead.didLazyReplacedAnchorsLateWidth -ZipRestThat.heartHowLead.dirtyButMute*2)*pinch);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.fixFootballImageView ? self.fixFootballImageView.frame.size.height + ZipRestThat.heartHowLead.zeroChecksum +ZipRestThat.heartHowLead.allGreatHashTouchesPrecisionWrist : ZipRestThat.heartHowLead.allGreatHashTouchesPrecisionWrist;
                    
                    make.size.mas_equalTo(CGSizeMake(ZipRestThat.heartHowLead.didLazyReplacedAnchorsLateWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.fixFootballImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.fixFootballImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *microFlagButton = [ZipRestThat subgroupHigherSharpenRunWeekColor:ZipRestThat.useCatAliveLow.featuredBirthdayExecutionDefinedDisparity];
    [microFlagButton addTarget:self action:@selector(topDoubleDiamondExplicitHandleNearby:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:microFlagButton];
    [microFlagButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-ZipRestThat.heartHowLead.allImageLeft);
        make.left.right.equalTo(self.tooGenderTextField);
        make.height.mas_equalTo(ZipRestThat.heartHowLead.proceedMolar);
    }];
    
}

- (void)topDoubleDiamondExplicitHandleNearby:(id)sender {

}

@end
