






#import "BurstRouterViewController.h"
#import "SDWebImageManager.h"
#import "TenToast.h"
#import "NSString+ArtBeacon.h"

@interface BurstRouterViewController ()

@property (nonatomic, strong) UIImageView *browsingRawImageView;
@property (nonatomic, strong) UITextField *uptimeSpaTextField;
@property (nonatomic, strong) UITextField *andKitMouseTextField;

@end

@implementation BurstRouterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.howPlusOldButton.hidden = [self.barsPubLink[0] boolValue];
    
    CGFloat cubeSwitchCalorieHormoneRestored = BadgeSunIcy.greekBlueArt.groupedMolar;
    
    UILabel *rawLabel = [BadgeSunIcy detectionRangingReadyDryMajor:BadgeSunIcy.lastCaretReply.pointerScrollsAdditiveCheckedDelay];
    rawLabel.numberOfLines = 0;
    [self.view addSubview:rawLabel];
    [rawLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BadgeSunIcy.greekBlueArt.genderTabSpa);
        make.left.mas_equalTo(BadgeSunIcy.greekBlueArt.echoSobAxial);
        make.right.mas_equalTo(-BadgeSunIcy.greekBlueArt.echoSobAxial);
    }];
    
    
    self.uptimeSpaTextField = [BadgeSunIcy smoothWaistField:BadgeSunIcy.lastCaretReply.beginStaleAsteriskSmoothTerabytesReached isSecure:NO];
    [self.view addSubview:self.uptimeSpaTextField];
    [self.uptimeSpaTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(rawLabel.mas_bottom).offset(cubeSwitchCalorieHormoneRestored);
        make.left.mas_equalTo(BadgeSunIcy.greekBlueArt.restoresCity);
        make.right.mas_equalTo(-BadgeSunIcy.greekBlueArt.restoresCity);
        make.height.mas_equalTo(BadgeSunIcy.greekBlueArt.muteEmailTab);
    }];
    
    
    self.andKitMouseTextField = [BadgeSunIcy smoothWaistField:BadgeSunIcy.lastCaretReply.humidityLastUseMediaSquareTone isSecure:NO];;
    [self.view addSubview:self.andKitMouseTextField];
    [self.andKitMouseTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.uptimeSpaTextField.mas_bottom).offset(cubeSwitchCalorieHormoneRestored);
        make.left.right.equalTo(self.uptimeSpaTextField);
        make.height.mas_equalTo(BadgeSunIcy.greekBlueArt.muteEmailTab);
    }];
    
    
    UIImageView *binCarImageView = nil;
    if ([self.barsPubLink[1] length] > 0) {
        
        binCarImageView = [[UIImageView alloc] init];
        binCarImageView.backgroundColor = UIColor.lightGrayColor;
        binCarImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:binCarImageView];
        [binCarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.andKitMouseTextField.mas_bottom).offset(cubeSwitchCalorieHormoneRestored);
            make.width.mas_equalTo(self.andKitMouseTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.browsingRawImageView = binCarImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.barsPubLink[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(), ^{
                binCarImageView.image = image2;
                CGFloat entry = image2.size.height / image2.size.width;
                [binCarImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((BadgeSunIcy.greekBlueArt.helperInactiveThreadPrimaryExtentWidth -BadgeSunIcy.greekBlueArt.restoresCity*2)*entry);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.browsingRawImageView ? self.browsingRawImageView.frame.size.height + BadgeSunIcy.greekBlueArt.groupedMolar +BadgeSunIcy.greekBlueArt.packetUploadingDownhillResolvedDispatchSecurity : BadgeSunIcy.greekBlueArt.packetUploadingDownhillResolvedDispatchSecurity;
                    
                    make.size.mas_equalTo(CGSizeMake(BadgeSunIcy.greekBlueArt.helperInactiveThreadPrimaryExtentWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.browsingRawImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.browsingRawImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *oddSenderButton = [BadgeSunIcy birthConductorWeekendDirectoryExtensionColor:BadgeSunIcy.lastCaretReply.scanCircleDescendLittleEqual];
    [oddSenderButton addTarget:self action:@selector(butMutableTextureSuffixGatherPolicy:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:oddSenderButton];
    [oddSenderButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-BadgeSunIcy.greekBlueArt.countCricket);
        make.left.right.equalTo(self.uptimeSpaTextField);
        make.height.mas_equalTo(BadgeSunIcy.greekBlueArt.pintBitError);
    }];
    
}

- (void)butMutableTextureSuffixGatherPolicy:(id)sender {

}

@end
