






#import "BandWindowsViewController.h"
#import "SDWebImageManager.h"
#import "PanToast.h"
#import "NSString+NotWindow.h"

@interface BandWindowsViewController ()

@property (nonatomic, strong) UIImageView *fixTimeLateImageView;
@property (nonatomic, strong) UITextField *arbitraryTextField;
@property (nonatomic, strong) UITextField *hasScopeOffTextField;

@end

@implementation BandWindowsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.bikeDarwinButton.hidden = [self.wonSiblings[0] boolValue];
    
    CGFloat libraryOuterSemanticHistoryButtons = FrictionShe.headphoneMay.busEndpoints;
    
    UILabel *bagLabel = [FrictionShe taskDifferentHexItemMarkup:FrictionShe.saltBurstFinal.windowAcceptBoundUndoneDrum];
    bagLabel.numberOfLines = 0;
    [self.view addSubview:bagLabel];
    [bagLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(FrictionShe.headphoneMay.hertzCompose);
        make.left.mas_equalTo(FrictionShe.headphoneMay.finderSunBig);
        make.right.mas_equalTo(-FrictionShe.headphoneMay.finderSunBig);
    }];
    
    
    self.arbitraryTextField = [FrictionShe pinkRefusedField:FrictionShe.saltBurstFinal.collectedSpecifiedThumbnailPressStrongUnify isSecure:NO];
    [self.view addSubview:self.arbitraryTextField];
    [self.arbitraryTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(bagLabel.mas_bottom).offset(libraryOuterSemanticHistoryButtons);
        make.left.mas_equalTo(FrictionShe.headphoneMay.identifyMill);
        make.right.mas_equalTo(-FrictionShe.headphoneMay.identifyMill);
        make.height.mas_equalTo(FrictionShe.headphoneMay.wetDolbySeed);
    }];
    
    
    self.hasScopeOffTextField = [FrictionShe pinkRefusedField:FrictionShe.saltBurstFinal.penNoteRejectionFactoriesBundlesDog isSecure:NO];;
    [self.view addSubview:self.hasScopeOffTextField];
    [self.hasScopeOffTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.arbitraryTextField.mas_bottom).offset(libraryOuterSemanticHistoryButtons);
        make.left.right.equalTo(self.arbitraryTextField);
        make.height.mas_equalTo(FrictionShe.headphoneMay.wetDolbySeed);
    }];
    
    
    UIImageView *tremorImageView = nil;
    if ([self.wonSiblings[1] length] > 0) {
        
        tremorImageView = [[UIImageView alloc] init];
        tremorImageView.backgroundColor = UIColor.lightGrayColor;
        tremorImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:tremorImageView];
        [tremorImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.hasScopeOffTextField.mas_bottom).offset(libraryOuterSemanticHistoryButtons);
            make.width.mas_equalTo(self.hasScopeOffTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.fixTimeLateImageView = tremorImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.wonSiblings[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(), ^{
                tremorImageView.image = image2;
                CGFloat focus = image2.size.height / image2.size.width;
                [tremorImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((FrictionShe.headphoneMay.cubicBouncingSpaBirthdayTwoWidth -FrictionShe.headphoneMay.identifyMill*2)*focus);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.fixTimeLateImageView ? self.fixTimeLateImageView.frame.size.height + FrictionShe.headphoneMay.busEndpoints +FrictionShe.headphoneMay.detectedAudiogramKirghizBrownHeaderIssuer : FrictionShe.headphoneMay.detectedAudiogramKirghizBrownHeaderIssuer;
                    
                    make.size.mas_equalTo(CGSizeMake(FrictionShe.headphoneMay.cubicBouncingSpaBirthdayTwoWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.fixTimeLateImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.fixTimeLateImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *authorityButton = [FrictionShe icyThiaminFarsiReadoutRetColor:FrictionShe.saltBurstFinal.previewHexBrotherDiskRenewed];
    [authorityButton addTarget:self action:@selector(formSoccerHeapSigmoidSummariesEar:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:authorityButton];
    [authorityButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-FrictionShe.headphoneMay.unlockBuffer);
        make.left.right.equalTo(self.arbitraryTextField);
        make.height.mas_equalTo(FrictionShe.headphoneMay.beatTouchMap);
    }];
    
}

- (void)formSoccerHeapSigmoidSummariesEar:(id)sender {
if (self.arbitraryTextField.text.dogPipeSense || self.hasScopeOffTextField.text.dogPipeSense) {
        [ItsAlertView hellmanPrefixedLongBetterNormalTied:FrictionShe.saltBurstFinal.bitWatery message:FrictionShe.saltBurstFinal.hashLegibleSensorMaxPagerAuthors completion:nil];
        return;
    }
    if ([self.buddhistAgent respondsToSelector:@selector(martialNineteenMultipleLocalizesPolarJabberWithName:widget:completion:)]) {
        [BaseLookupView mergeMoleFeetWindow];
        [self.buddhistAgent martialNineteenMultipleLocalizesPolarJabberWithName:self.arbitraryTextField.text widget:self.hasScopeOffTextField.text completion:^(id object) {
            [BaseLookupView adoptPickSlantResolvedEntityWindow];
            if ([object boolValue]) {
                [[OpaqueKeyManager shared] overMatchPinWindow];
                [PanToast warnVerify:FrictionShe.saltBurstFinal.siteHitVirtualHintLacrosseScanned];
            }
        }];
    }
}

@end
