






#import "PenMapMovieViewController.h"
#import "SDWebImageManager.h"
#import "MapToast.h"
#import "NSString+EntityNet.h"

@interface PenMapMovieViewController ()

@property (nonatomic, strong) UIImageView *binIcyMixerImageView;
@property (nonatomic, strong) UITextField *reviewSayTextField;
@property (nonatomic, strong) UITextField *shiftNetSpaTextField;

@end

@implementation PenMapMovieViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.feetHowAndButton.hidden = [self.sinFrontIll[0] boolValue];
    
    CGFloat kirghizHowBrandOccurredEntries = ZipCoulombs.locatorCanon.encodeDidSun;
    
    UILabel *bigLabel = [ZipCoulombs barriersDrumLeakyLimitReveal:ZipCoulombs.airAgeGreekAnd.butterflyBridgingBehaviorAccountsLove];
    bigLabel.numberOfLines = 0;
    [self.view addSubview:bigLabel];
    [bigLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ZipCoulombs.locatorCanon.literPostTwo);
        make.left.mas_equalTo(ZipCoulombs.locatorCanon.yetPathLocal);
        make.right.mas_equalTo(-ZipCoulombs.locatorCanon.yetPathLocal);
    }];
    
    
    self.reviewSayTextField = [ZipCoulombs mixCaffeineField:ZipCoulombs.airAgeGreekAnd.formattedIcyParameterMidPrimeExtents isSecure:NO];
    [self.view addSubview:self.reviewSayTextField];
    [self.reviewSayTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(bigLabel.mas_bottom).offset(kirghizHowBrandOccurredEntries);
        make.left.mas_equalTo(ZipCoulombs.locatorCanon.playWireless);
        make.right.mas_equalTo(-ZipCoulombs.locatorCanon.playWireless);
        make.height.mas_equalTo(ZipCoulombs.locatorCanon.illTeluguTag);
    }];
    
    
    self.shiftNetSpaTextField = [ZipCoulombs mixCaffeineField:ZipCoulombs.airAgeGreekAnd.breakSamplesTemporalDisallowBinGenre isSecure:NO];;
    [self.view addSubview:self.shiftNetSpaTextField];
    [self.shiftNetSpaTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.reviewSayTextField.mas_bottom).offset(kirghizHowBrandOccurredEntries);
        make.left.right.equalTo(self.reviewSayTextField);
        make.height.mas_equalTo(ZipCoulombs.locatorCanon.illTeluguTag);
    }];
    
    
    UIImageView *reloadImageView = nil;
    if ([self.sinFrontIll[1] length] > 0) {
        
        reloadImageView = [[UIImageView alloc] init];
        reloadImageView.backgroundColor = UIColor.lightGrayColor;
        reloadImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:reloadImageView];
        [reloadImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.shiftNetSpaTextField.mas_bottom).offset(kirghizHowBrandOccurredEntries);
            make.width.mas_equalTo(self.shiftNetSpaTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.binIcyMixerImageView = reloadImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.sinFrontIll[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(), ^{
                reloadImageView.image = image2;
                CGFloat visit = image2.size.height / image2.size.width;
                [reloadImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((ZipCoulombs.locatorCanon.bleedSlashesImmediateLogTelephotoWidth -ZipCoulombs.locatorCanon.playWireless*2)*visit);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.binIcyMixerImageView ? self.binIcyMixerImageView.frame.size.height + ZipCoulombs.locatorCanon.encodeDidSun +ZipCoulombs.locatorCanon.aspectStandSafetyPriorSundaneseBevel : ZipCoulombs.locatorCanon.aspectStandSafetyPriorSundaneseBevel;
                    
                    make.size.mas_equalTo(CGSizeMake(ZipCoulombs.locatorCanon.bleedSlashesImmediateLogTelephotoWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.binIcyMixerImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.binIcyMixerImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *resolvingButton = [ZipCoulombs bayerEyeLoopDecideRelevanceColor:ZipCoulombs.airAgeGreekAnd.notifyingThemeTwelveBengaliPositive];
    [resolvingButton addTarget:self action:@selector(waxEventualRenameCardLogCup:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:resolvingButton];
    [resolvingButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-ZipCoulombs.locatorCanon.catRecognize);
        make.left.right.equalTo(self.reviewSayTextField);
        make.height.mas_equalTo(ZipCoulombs.locatorCanon.orderTagsOff);
    }];
    
}

- (void)waxEventualRenameCardLogCup:(id)sender {

}

@end
