






#import "PolarWhoEggViewController.h"
#import "SDWebImageManager.h"
#import "PutToast.h"
#import "NSString+YellowRet.h"

@interface PolarWhoEggViewController ()

@property (nonatomic, strong) UIImageView *reviewTouchImageView;
@property (nonatomic, strong) UITextField *shotOfferTextField;
@property (nonatomic, strong) UITextField *icyCubeMainTextField;

@end

@implementation PolarWhoEggViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.repeatsDogButton.hidden = [self.packFlagLaw[0] boolValue];
    
    CGFloat gracefulTaskAmharicShareHeap = HourEllipse.howSignaling.briefBookMay;
    
    UILabel *penLabel = [HourEllipse ownAlienContextEscapeDash:HourEllipse.alienSemaphore.epsilonFaxWorkoutsAgeMultiple];
    penLabel.numberOfLines = 0;
    [self.view addSubview:penLabel];
    [penLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(HourEllipse.howSignaling.undoneStereo);
        make.left.mas_equalTo(HourEllipse.howSignaling.oneRightTool);
        make.right.mas_equalTo(-HourEllipse.howSignaling.oneRightTool);
    }];
    
    
    self.shotOfferTextField = [HourEllipse hexRawTrialField:HourEllipse.alienSemaphore.offsetTypeSignalCompoundHowTag isSecure:NO];
    [self.view addSubview:self.shotOfferTextField];
    [self.shotOfferTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(penLabel.mas_bottom).offset(gracefulTaskAmharicShareHeap);
        make.left.mas_equalTo(HourEllipse.howSignaling.socialSindhi);
        make.right.mas_equalTo(-HourEllipse.howSignaling.socialSindhi);
        make.height.mas_equalTo(HourEllipse.howSignaling.quitErrorBig);
    }];
    
    
    self.icyCubeMainTextField = [HourEllipse hexRawTrialField:HourEllipse.alienSemaphore.actionsPortalCommandsSpatialTwistSlide isSecure:NO];;
    [self.view addSubview:self.icyCubeMainTextField];
    [self.icyCubeMainTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.shotOfferTextField.mas_bottom).offset(gracefulTaskAmharicShareHeap);
        make.left.right.equalTo(self.shotOfferTextField);
        make.height.mas_equalTo(HourEllipse.howSignaling.quitErrorBig);
    }];
    
    
    UIImageView *outTryImageView = nil;
    if ([self.packFlagLaw[1] length] > 0) {
        
        outTryImageView = [[UIImageView alloc] init];
        outTryImageView.backgroundColor = UIColor.lightGrayColor;
        outTryImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:outTryImageView];
        [outTryImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.icyCubeMainTextField.mas_bottom).offset(gracefulTaskAmharicShareHeap);
            make.width.mas_equalTo(self.icyCubeMainTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.reviewTouchImageView = outTryImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.packFlagLaw[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(), ^{
                outTryImageView.image = image2;
                CGFloat along = image2.size.height / image2.size.width;
                [outTryImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((HourEllipse.howSignaling.unifyCategorySecondaryLinerAboutWidth -HourEllipse.howSignaling.socialSindhi*2)*along);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.reviewTouchImageView ? self.reviewTouchImageView.frame.size.height + HourEllipse.howSignaling.briefBookMay +HourEllipse.howSignaling.unableChainFlagAskHexOdd : HourEllipse.howSignaling.unableChainFlagAskHexOdd;
                    
                    make.size.mas_equalTo(CGSizeMake(HourEllipse.howSignaling.unifyCategorySecondaryLinerAboutWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.reviewTouchImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.reviewTouchImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *sodiumWinButton = [HourEllipse boldfaceNapPhonogramComplexBordersColor:HourEllipse.alienSemaphore.quietPackageThicknessIronReclaim];
    [sodiumWinButton addTarget:self action:@selector(followSecureLighterLikeLoveWrite:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:sodiumWinButton];
    [sodiumWinButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-HourEllipse.howSignaling.retainSinEra);
        make.left.right.equalTo(self.shotOfferTextField);
        make.height.mas_equalTo(HourEllipse.howSignaling.chinaRankTab);
    }];
    
}

- (void)followSecureLighterLikeLoveWrite:(id)sender {

}

@end
