






#import "NapSolidSinViewController.h"
#import "SDWebImageManager.h"
#import "JobToast.h"
#import "NSString+Magnesium.h"

@interface NapSolidSinViewController ()

@property (nonatomic, strong) UIImageView *lookMalteseImageView;
@property (nonatomic, strong) UITextField *andNormalTextField;
@property (nonatomic, strong) UITextField *samplesMailTextField;

@end

@implementation NapSolidSinViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.golfRawSumButton.hidden = [self.schoolUnify[0] boolValue];
    
    CGFloat stripNowSurrogateManPop = RowGivenOut.mathProxyKin.eyeOneSingle;
    
    UILabel *theLabel = [RowGivenOut sockComputerMonotonicSerbianLaw:RowGivenOut.nineHisSoloTen.graphicsResultBothProceedChain];
    theLabel.numberOfLines = 0;
    [self.view addSubview:theLabel];
    [theLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(RowGivenOut.mathProxyKin.audibleTotal);
        make.left.mas_equalTo(RowGivenOut.mathProxyKin.anyHalfMagic);
        make.right.mas_equalTo(-RowGivenOut.mathProxyKin.anyHalfMagic);
    }];
    
    
    self.andNormalTextField = [RowGivenOut deviceMovieField:RowGivenOut.nineHisSoloTen.themeMonthPageUkrainianEnclosingSubgroups isSecure:NO];
    [self.view addSubview:self.andNormalTextField];
    [self.andNormalTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(theLabel.mas_bottom).offset(stripNowSurrogateManPop);
        make.left.mas_equalTo(RowGivenOut.mathProxyKin.clipPivotAll);
        make.right.mas_equalTo(-RowGivenOut.mathProxyKin.clipPivotAll);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.spaGaspScore);
    }];
    
    
    self.samplesMailTextField = [RowGivenOut deviceMovieField:RowGivenOut.nineHisSoloTen.lessChargingBreakArtistRawCut isSecure:NO];;
    [self.view addSubview:self.samplesMailTextField];
    [self.samplesMailTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.andNormalTextField.mas_bottom).offset(stripNowSurrogateManPop);
        make.left.right.equalTo(self.andNormalTextField);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.spaGaspScore);
    }];
    
    
    UIImageView *copticImageView = nil;
    if ([self.schoolUnify[1] length] > 0) {
        
        copticImageView = [[UIImageView alloc] init];
        copticImageView.backgroundColor = UIColor.lightGrayColor;
        copticImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:copticImageView];
        [copticImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.samplesMailTextField.mas_bottom).offset(stripNowSurrogateManPop);
            make.width.mas_equalTo(self.samplesMailTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.lookMalteseImageView = copticImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.schoolUnify[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(), ^{
                copticImageView.image = image2;
                CGFloat cycle = image2.size.height / image2.size.width;
                [copticImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((RowGivenOut.mathProxyKin.pencilTopSemicolonChatterDayWidth -RowGivenOut.mathProxyKin.clipPivotAll*2)*cycle);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.lookMalteseImageView ? self.lookMalteseImageView.frame.size.height + RowGivenOut.mathProxyKin.eyeOneSingle +RowGivenOut.mathProxyKin.reactorProgramPaddleLetterManagersVirtual : RowGivenOut.mathProxyKin.reactorProgramPaddleLetterManagersVirtual;
                    
                    make.size.mas_equalTo(CGSizeMake(RowGivenOut.mathProxyKin.pencilTopSemicolonChatterDayWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.lookMalteseImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.lookMalteseImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *scheduledButton = [RowGivenOut moreCutoffGuestSecondRedefinedColor:RowGivenOut.nineHisSoloTen.transitOldDimensionBottomPicker];
    [scheduledButton addTarget:self action:@selector(quietUplinkVoiceWeekdayPanElder:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:scheduledButton];
    [scheduledButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-RowGivenOut.mathProxyKin.beganSoloist);
        make.left.right.equalTo(self.andNormalTextField);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.rotateEarUse);
    }];
    
}

- (void)quietUplinkVoiceWeekdayPanElder:(id)sender {

}

@end
