






#import "TipBaselineViewController.h"
#import "SDWebImageManager.h"
#import "MaxToast.h"
#import "NSString+PublicDry.h"

@interface TipBaselineViewController ()

@property (nonatomic, strong) UIImageView *stairTooHowImageView;
@property (nonatomic, strong) UITextField *napSchoolTextField;
@property (nonatomic, strong) UITextField *lastHourDueTextField;

@end

@implementation TipBaselineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.reportsHasButton.hidden = [self.yetLearnTab[0] boolValue];
    
    CGFloat higherLocationsAskHandoffTruncates = CupDenyLeap.rarePutOther.senseDescent;
    
    UILabel *bagLabel = [CupDenyLeap temporalDownloadAdjustSiblingsStyle:CupDenyLeap.cutReuseIcyOur.oneBoxMetricsRespectsScrolls];
    bagLabel.numberOfLines = 0;
    [self.view addSubview:bagLabel];
    [bagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(CupDenyLeap.rarePutOther.hueOriginSex);
        make.left.mas_equalTo(CupDenyLeap.rarePutOther.producesGasp);
        make.right.mas_equalTo(-CupDenyLeap.rarePutOther.producesGasp);
    }];
    
    
    self.napSchoolTextField = [CupDenyLeap phaseBecomeField:CupDenyLeap.cutReuseIcyOur.cadenceStalledSpeakerHueRevokedRejection isSecure:NO];
    [self.view addSubview:self.napSchoolTextField];
    [self.napSchoolTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(bagLabel.mas_bottom).offset(higherLocationsAskHandoffTruncates);
        make.left.mas_equalTo(CupDenyLeap.rarePutOther.preservedWas);
        make.right.mas_equalTo(-CupDenyLeap.rarePutOther.preservedWas);
        make.height.mas_equalTo(CupDenyLeap.rarePutOther.dragErrorBag);
    }];
    
    
    self.lastHourDueTextField = [CupDenyLeap phaseBecomeField:CupDenyLeap.cutReuseIcyOur.tipHighlightOurOverdueSmartInventory isSecure:NO];;
    [self.view addSubview:self.lastHourDueTextField];
    [self.lastHourDueTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.napSchoolTextField.mas_bottom).offset(higherLocationsAskHandoffTruncates);
        make.left.right.equalTo(self.napSchoolTextField);
        make.height.mas_equalTo(CupDenyLeap.rarePutOther.dragErrorBag);
    }];
    
    
    UIImageView *indentImageView = nil;
    if ([self.yetLearnTab[1] length] > 0) {
        
        indentImageView = [[UIImageView alloc] init];
        indentImageView.backgroundColor = UIColor.lightGrayColor;
        indentImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:indentImageView];
        [indentImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.lastHourDueTextField.mas_bottom).offset(higherLocationsAskHandoffTruncates);
            make.width.mas_equalTo(self.lastHourDueTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.stairTooHowImageView = indentImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.yetLearnTab[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(), ^{
                indentImageView.image = image2;
                CGFloat welsh = image2.size.height / image2.size.width;
                [indentImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((CupDenyLeap.rarePutOther.magicIdenticalSyntheticSubjectThreeWidth -CupDenyLeap.rarePutOther.preservedWas*2)*welsh);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.stairTooHowImageView ? self.stairTooHowImageView.frame.size.height + CupDenyLeap.rarePutOther.senseDescent +CupDenyLeap.rarePutOther.blueFreeMomentImmediateSuggestedSymmetric : CupDenyLeap.rarePutOther.blueFreeMomentImmediateSuggestedSymmetric;
                    
                    make.size.mas_equalTo(CGSizeMake(CupDenyLeap.rarePutOther.magicIdenticalSyntheticSubjectThreeWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.stairTooHowImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.stairTooHowImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *plusLevelButton = [CupDenyLeap endSourceApplierAchievedLigatureColor:CupDenyLeap.cutReuseIcyOur.appendingPotentialMarginWarpPlay];
    [plusLevelButton addTarget:self action:@selector(fileTempPerformsSeparateRenamingOverride:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:plusLevelButton];
    [plusLevelButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-CupDenyLeap.rarePutOther.negativePeer);
        make.left.right.equalTo(self.napSchoolTextField);
        make.height.mas_equalTo(CupDenyLeap.rarePutOther.canSideRaise);
    }];
    
}

- (void)fileTempPerformsSeparateRenamingOverride:(id)sender {

}

@end
