






#import "PullSandboxViewController.h"
#import "SDWebImageManager.h"
#import "RetToast.h"
#import "NSString+Enclosing.h"

@interface PullSandboxViewController ()

@property (nonatomic, strong) UIImageView *encryptFoodImageView;
@property (nonatomic, strong) UITextField *buildAutoTextField;
@property (nonatomic, strong) UITextField *illEncodingTextField;

@end

@implementation PullSandboxViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.familyStayButton.hidden = [self.patchFatYou[0] boolValue];
    
    CGFloat bedSeedTipTipGeorgian = WetDoneFill.artSensitive.sunEarOption;
    
    UILabel *tapLabel = [WetDoneFill thousandsFaxSigmaBengaliWet:WetDoneFill.wideHostLooper.vibrancyHasTorchBaseArchive];
    tapLabel.numberOfLines = 0;
    [self.view addSubview:tapLabel];
    [tapLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(WetDoneFill.artSensitive.bagVitalFile);
        make.left.mas_equalTo(WetDoneFill.artSensitive.unionTrapThe);
        make.right.mas_equalTo(-WetDoneFill.artSensitive.unionTrapThe);
    }];
    
    
    self.buildAutoTextField = [WetDoneFill phaseCatBusField:WetDoneFill.wideHostLooper.selectSyntheticIntegritySpecificChunkyIterate isSecure:NO];
    [self.view addSubview:self.buildAutoTextField];
    [self.buildAutoTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(tapLabel.mas_bottom).offset(bedSeedTipTipGeorgian);
        make.left.mas_equalTo(WetDoneFill.artSensitive.flipWhoCocoa);
        make.right.mas_equalTo(-WetDoneFill.artSensitive.flipWhoCocoa);
        make.height.mas_equalTo(WetDoneFill.artSensitive.canPrintable);
    }];
    
    
    self.illEncodingTextField = [WetDoneFill phaseCatBusField:WetDoneFill.wideHostLooper.escapeDisplaysDaughtersBufferedFlemishLate isSecure:NO];;
    [self.view addSubview:self.illEncodingTextField];
    [self.illEncodingTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.buildAutoTextField.mas_bottom).offset(bedSeedTipTipGeorgian);
        make.left.right.equalTo(self.buildAutoTextField);
        make.height.mas_equalTo(WetDoneFill.artSensitive.canPrintable);
    }];
    
    
    UIImageView *drivenImageView = nil;
    if ([self.patchFatYou[1] length] > 0) {
        
        drivenImageView = [[UIImageView alloc] init];
        drivenImageView.backgroundColor = UIColor.lightGrayColor;
        drivenImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:drivenImageView];
        [drivenImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.illEncodingTextField.mas_bottom).offset(bedSeedTipTipGeorgian);
            make.width.mas_equalTo(self.illEncodingTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.encryptFoodImageView = drivenImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.patchFatYou[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(), ^{
                drivenImageView.image = image2;
                CGFloat solid = image2.size.height / image2.size.width;
                [drivenImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((WetDoneFill.artSensitive.modifiersFilenamesDistinctCityDetailWidth -WetDoneFill.artSensitive.flipWhoCocoa*2)*solid);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.encryptFoodImageView ? self.encryptFoodImageView.frame.size.height + WetDoneFill.artSensitive.sunEarOption +WetDoneFill.artSensitive.newsstandAutoPatternPopAutoSon : WetDoneFill.artSensitive.newsstandAutoPatternPopAutoSon;
                    
                    make.size.mas_equalTo(CGSizeMake(WetDoneFill.artSensitive.modifiersFilenamesDistinctCityDetailWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.encryptFoodImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.encryptFoodImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *exhaustedButton = [WetDoneFill takeBendReachableResultsDatumColor:WetDoneFill.wideHostLooper.sliceGrowDatumMembersIdiom];
    [exhaustedButton addTarget:self action:@selector(automaticHisVoiceDueEncodingsAsk:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:exhaustedButton];
    [exhaustedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-WetDoneFill.artSensitive.browsingBusy);
        make.left.right.equalTo(self.buildAutoTextField);
        make.height.mas_equalTo(WetDoneFill.artSensitive.hailCapacity);
    }];
    
}

- (void)automaticHisVoiceDueEncodingsAsk:(id)sender {

}

@end
