






#import "BusWaitTurnViewController.h"
#import "SDWebImageManager.h"
#import "SinToast.h"
#import "NSString+DrumVowel.h"

@interface BusWaitTurnViewController ()

@property (nonatomic, strong) UIImageView *coverTryMixImageView;
@property (nonatomic, strong) UITextField *convertedTextField;
@property (nonatomic, strong) UITextField *worldDayFunTextField;

@end

@implementation BusWaitTurnViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.sendPinUseButton.hidden = [self.tablePanFor[0] boolValue];
    
    CGFloat preservedMaxBalanceCubeLocality = TooCloudSun.seeFocusSlab.mediumDetail;
    
    UILabel *busLabel = [TooCloudSun saveReceivedSmallestBasicTrigger:TooCloudSun.methodCaseItem.burmeseCharOutWaitPhonetic];
    busLabel.numberOfLines = 0;
    [self.view addSubview:busLabel];
    [busLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(TooCloudSun.seeFocusSlab.rawUnfocused);
        make.left.mas_equalTo(TooCloudSun.seeFocusSlab.valuePingCap);
        make.right.mas_equalTo(-TooCloudSun.seeFocusSlab.valuePingCap);
    }];
    
    
    self.convertedTextField = [TooCloudSun deferredIcyField:TooCloudSun.methodCaseItem.shiftBuiltTransformFloatingSafetyBehavior isSecure:NO];
    [self.view addSubview:self.convertedTextField];
    [self.convertedTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(busLabel.mas_bottom).offset(preservedMaxBalanceCubeLocality);
        make.left.mas_equalTo(TooCloudSun.seeFocusSlab.addAggregate);
        make.right.mas_equalTo(-TooCloudSun.seeFocusSlab.addAggregate);
        make.height.mas_equalTo(TooCloudSun.seeFocusSlab.plugTraitTwo);
    }];
    
    
    self.worldDayFunTextField = [TooCloudSun deferredIcyField:TooCloudSun.methodCaseItem.intersectYoungestStructureLayoutSentinelColor isSecure:NO];;
    [self.view addSubview:self.worldDayFunTextField];
    [self.worldDayFunTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.convertedTextField.mas_bottom).offset(preservedMaxBalanceCubeLocality);
        make.left.right.equalTo(self.convertedTextField);
        make.height.mas_equalTo(TooCloudSun.seeFocusSlab.plugTraitTwo);
    }];
    
    
    UIImageView *prefixImageView = nil;
    if ([self.tablePanFor[1] length] > 0) {
        
        prefixImageView = [[UIImageView alloc] init];
        prefixImageView.backgroundColor = UIColor.lightGrayColor;
        prefixImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:prefixImageView];
        [prefixImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.worldDayFunTextField.mas_bottom).offset(preservedMaxBalanceCubeLocality);
            make.width.mas_equalTo(self.worldDayFunTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.coverTryMixImageView = prefixImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.tablePanFor[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(), ^{
                prefixImageView.image = image2;
                CGFloat sense = image2.size.height / image2.size.width;
                [prefixImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((TooCloudSun.seeFocusSlab.bookmarkUtilitiesResolvedUnlockedHaveWidth -TooCloudSun.seeFocusSlab.addAggregate*2)*sense);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.coverTryMixImageView ? self.coverTryMixImageView.frame.size.height + TooCloudSun.seeFocusSlab.mediumDetail +TooCloudSun.seeFocusSlab.integrateDarwinScrollingLetterMarkEnabling : TooCloudSun.seeFocusSlab.integrateDarwinScrollingLetterMarkEnabling;
                    
                    make.size.mas_equalTo(CGSizeMake(TooCloudSun.seeFocusSlab.bookmarkUtilitiesResolvedUnlockedHaveWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.coverTryMixImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.coverTryMixImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *mapFourthButton = [TooCloudSun mouthExtentsLettishSquaresMonotonicColor:TooCloudSun.methodCaseItem.funSharpnessAspectAutomaticMagnesium];
    [mapFourthButton addTarget:self action:@selector(fastDarwinWaitingDescendedAssignExpire:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:mapFourthButton];
    [mapFourthButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-TooCloudSun.seeFocusSlab.fatVendorSpa);
        make.left.right.equalTo(self.convertedTextField);
        make.height.mas_equalTo(TooCloudSun.seeFocusSlab.ditherWhoBar);
    }];
    
}

- (void)fastDarwinWaitingDescendedAssignExpire:(id)sender {

}

@end
