






#import "AxesBlockerViewController.h"
#import "SDWebImageManager.h"
#import "ZipToast.h"
#import "NSString+OrderReal.h"

@interface AxesBlockerViewController ()

@property (nonatomic, strong) UIImageView *polarTenLowImageView;
@property (nonatomic, strong) UITextField *pairPriceTextField;
@property (nonatomic, strong) UITextField *tipFourUnitTextField;

@end

@implementation AxesBlockerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.dueLexiconButton.hidden = [self.weeklySpeed[0] boolValue];
    
    CGFloat slidePrefersPreventQueueIndian = DueIcyFetch.itsPosterIcy.recoveredLow;
    
    UILabel *areLabel = [DueIcyFetch soloistRebusArabicManganeseGestures:DueIcyFetch.catBaseSinFill.dueHashScoreSenseTool];
    areLabel.numberOfLines = 0;
    [self.view addSubview:areLabel];
    [areLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(DueIcyFetch.itsPosterIcy.appearTooKit);
        make.left.mas_equalTo(DueIcyFetch.itsPosterIcy.managerMetal);
        make.right.mas_equalTo(-DueIcyFetch.itsPosterIcy.managerMetal);
    }];
    
    
    self.pairPriceTextField = [DueIcyFetch warnWhoNameField:DueIcyFetch.catBaseSinFill.evaluateDomainTagsPurpleNoiseExtra isSecure:NO];
    [self.view addSubview:self.pairPriceTextField];
    [self.pairPriceTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(areLabel.mas_bottom).offset(slidePrefersPreventQueueIndian);
        make.left.mas_equalTo(DueIcyFetch.itsPosterIcy.flowStrategy);
        make.right.mas_equalTo(-DueIcyFetch.itsPosterIcy.flowStrategy);
        make.height.mas_equalTo(DueIcyFetch.itsPosterIcy.operandPiece);
    }];
    
    
    self.tipFourUnitTextField = [DueIcyFetch warnWhoNameField:DueIcyFetch.catBaseSinFill.pronounRemovableAboveHighlightBagCat isSecure:NO];;
    [self.view addSubview:self.tipFourUnitTextField];
    [self.tipFourUnitTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.pairPriceTextField.mas_bottom).offset(slidePrefersPreventQueueIndian);
        make.left.right.equalTo(self.pairPriceTextField);
        make.height.mas_equalTo(DueIcyFetch.itsPosterIcy.operandPiece);
    }];
    
    
    UIImageView *bottomImageView = nil;
    if ([self.weeklySpeed[1] length] > 0) {
        
        bottomImageView = [[UIImageView alloc] init];
        bottomImageView.backgroundColor = UIColor.lightGrayColor;
        bottomImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:bottomImageView];
        [bottomImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.tipFourUnitTextField.mas_bottom).offset(slidePrefersPreventQueueIndian);
            make.width.mas_equalTo(self.tipFourUnitTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.polarTenLowImageView = bottomImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.weeklySpeed[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(), ^{
                bottomImageView.image = image2;
                CGFloat ratio = image2.size.height / image2.size.width;
                [bottomImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((DueIcyFetch.itsPosterIcy.microNumericUseUptimeCallWidth -DueIcyFetch.itsPosterIcy.flowStrategy*2)*ratio);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.polarTenLowImageView ? self.polarTenLowImageView.frame.size.height + DueIcyFetch.itsPosterIcy.recoveredLow +DueIcyFetch.itsPosterIcy.viabilitySoccerIterationStrategyChlorideAudited : DueIcyFetch.itsPosterIcy.viabilitySoccerIterationStrategyChlorideAudited;
                    
                    make.size.mas_equalTo(CGSizeMake(DueIcyFetch.itsPosterIcy.microNumericUseUptimeCallWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.polarTenLowImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.polarTenLowImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *blockBookButton = [DueIcyFetch expertNetBitsSplatHeaderColor:DueIcyFetch.catBaseSinFill.genderTextureFarsiLighterIdle];
    [blockBookButton addTarget:self action:@selector(maxIncrementIdleWeightedProposedSub:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:blockBookButton];
    [blockBookButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-DueIcyFetch.itsPosterIcy.midGradeFile);
        make.left.right.equalTo(self.pairPriceTextField);
        make.height.mas_equalTo(DueIcyFetch.itsPosterIcy.pascalTipTab);
    }];
    
}

- (void)maxIncrementIdleWeightedProposedSub:(id)sender {
if (self.pairPriceTextField.text.icyAreDigest || self.tipFourUnitTextField.text.icyAreDigest) {
        [SinAlertView pubPromisedSmartWaySettlingDecrypted:DueIcyFetch.catBaseSinFill.systemHex message:DueIcyFetch.catBaseSinFill.pagerAlphabetMileRestMinFootball completion:nil];
        return;
    }
    if ([self.sinHyphensOpt respondsToSelector:@selector(repeatsLeaseRenewingEarBehaviorsFootballWithName:twelve:completion:)]) {
        [BinaryBankView napSumMixNextWindow];
        [self.sinHyphensOpt repeatsLeaseRenewingEarBehaviorsFootballWithName:self.pairPriceTextField.text twelve:self.tipFourUnitTextField.text completion:^(id object) {
            [BinaryBankView lessNoteGlucoseProminentBufferWindow];
            if ([object boolValue]) {
                [[TalkArrayManager shared] whileRearBigWindow];
                [ZipToast dryFaxOnce:DueIcyFetch.catBaseSinFill.greenLiterVoiceGivenFaxPlane];
            }
        }];
    }
}

@end
