






#import "ConcertEasyViewController.h"
#import "SDWebImageManager.h"
#import "SubToast.h"
#import "NSString+Nanograms.h"

@interface ConcertEasyViewController ()

@property (nonatomic, strong) UIImageView *positionOddImageView;
@property (nonatomic, strong) UITextField *taskRelayTextField;
@property (nonatomic, strong) UITextField *tokenKelvinTextField;

@end

@implementation ConcertEasyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.carIcyMaleButton.hidden = [self.cellularKin[0] boolValue];
    
    CGFloat unitClaimPartiallyTextualToday = FixChunkBad.swedishTwist.beenButTeeth;
    
    UILabel *mapLabel = [FixChunkBad portraitHyphensHormoneAnotherEligible:FixChunkBad.passLazyUnique.reachableRecentBaseExpectingAbsolute];
    mapLabel.numberOfLines = 0;
    [self.view addSubview:mapLabel];
    [mapLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(FixChunkBad.swedishTwist.romanUnlearn);
        make.left.mas_equalTo(FixChunkBad.swedishTwist.herAlongHalf);
        make.right.mas_equalTo(-FixChunkBad.swedishTwist.herAlongHalf);
    }];
    
    
    self.taskRelayTextField = [FixChunkBad englishWakeField:FixChunkBad.passLazyUnique.dayDeliveredListCoachedDigitizedRhythm isSecure:NO];
    [self.view addSubview:self.taskRelayTextField];
    [self.taskRelayTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(mapLabel.mas_bottom).offset(unitClaimPartiallyTextualToday);
        make.left.mas_equalTo(FixChunkBad.swedishTwist.pieceSlowKin);
        make.right.mas_equalTo(-FixChunkBad.swedishTwist.pieceSlowKin);
        make.height.mas_equalTo(FixChunkBad.swedishTwist.mostIllBreak);
    }];
    
    
    self.tokenKelvinTextField = [FixChunkBad englishWakeField:FixChunkBad.passLazyUnique.builderArrowHomepageTransitDefaultTime isSecure:NO];;
    [self.view addSubview:self.tokenKelvinTextField];
    [self.tokenKelvinTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.taskRelayTextField.mas_bottom).offset(unitClaimPartiallyTextualToday);
        make.left.right.equalTo(self.taskRelayTextField);
        make.height.mas_equalTo(FixChunkBad.swedishTwist.mostIllBreak);
    }];
    
    
    UIImageView *darkenImageView = nil;
    if ([self.cellularKin[1] length] > 0) {
        
        darkenImageView = [[UIImageView alloc] init];
        darkenImageView.backgroundColor = UIColor.lightGrayColor;
        darkenImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:darkenImageView];
        [darkenImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.tokenKelvinTextField.mas_bottom).offset(unitClaimPartiallyTextualToday);
            make.width.mas_equalTo(self.tokenKelvinTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.positionOddImageView = darkenImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.cellularKin[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(), ^{
                darkenImageView.image = image2;
                CGFloat about = image2.size.height / image2.size.width;
                [darkenImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((FixChunkBad.swedishTwist.momentPurchasedMethodDueCancelingWidth -FixChunkBad.swedishTwist.pieceSlowKin*2)*about);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.positionOddImageView ? self.positionOddImageView.frame.size.height + FixChunkBad.swedishTwist.beenButTeeth +FixChunkBad.swedishTwist.chineseSeedFaxViewArtHard : FixChunkBad.swedishTwist.chineseSeedFaxViewArtHard;
                    
                    make.size.mas_equalTo(CGSizeMake(FixChunkBad.swedishTwist.momentPurchasedMethodDueCancelingWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.positionOddImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.positionOddImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *spaceItemButton = [FixChunkBad transportLastLightDelayPlaneColor:FixChunkBad.passLazyUnique.symbolWrittenCropAnotherIrish];
    [spaceItemButton addTarget:self action:@selector(ownCubeLowTruncatedIntegerResumed:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:spaceItemButton];
    [spaceItemButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-FixChunkBad.swedishTwist.linerFlipped);
        make.left.right.equalTo(self.taskRelayTextField);
        make.height.mas_equalTo(FixChunkBad.swedishTwist.clockIntents);
    }];
    
}

- (void)ownCubeLowTruncatedIntegerResumed:(id)sender {

}

@end
