






#import "SockHerFiveViewController.h"
#import "SDWebImageManager.h"
#import "MidToast.h"
#import "NSString+Violation.h"

@interface SockHerFiveViewController ()

@property (nonatomic, strong) UIImageView *offReversedImageView;
@property (nonatomic, strong) UITextField *dismissalTextField;
@property (nonatomic, strong) UITextField *countedRareTextField;

@end

@implementation SockHerFiveViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.crossClampButton.hidden = [self.tiedDecibel[0] boolValue];
    
    CGFloat containsGallonEditShortcutsBlack = ButPhonetic.ditheredFast.barsBouncing;
    
    UILabel *seeLabel = [ButPhonetic striationCombineDetailIdleExpanded:ButPhonetic.snowTabWhoDrum.limitHurricaneSafeSilencedRace];
    seeLabel.numberOfLines = 0;
    [self.view addSubview:seeLabel];
    [seeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ButPhonetic.ditheredFast.carBeginWrap);
        make.left.mas_equalTo(ButPhonetic.ditheredFast.linerDarkHas);
        make.right.mas_equalTo(-ButPhonetic.ditheredFast.linerDarkHas);
    }];
    
    
    self.dismissalTextField = [ButPhonetic loopDoneArmField:ButPhonetic.snowTabWhoDrum.filterReverseSoloYouAzimuthFix isSecure:NO];
    [self.view addSubview:self.dismissalTextField];
    [self.dismissalTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(seeLabel.mas_bottom).offset(containsGallonEditShortcutsBlack);
        make.left.mas_equalTo(ButPhonetic.ditheredFast.lockRowChain);
        make.right.mas_equalTo(-ButPhonetic.ditheredFast.lockRowChain);
        make.height.mas_equalTo(ButPhonetic.ditheredFast.capacityHair);
    }];
    
    
    self.countedRareTextField = [ButPhonetic loopDoneArmField:ButPhonetic.snowTabWhoDrum.librariesDeliveredLoadGrammarProvideAcute isSecure:NO];;
    [self.view addSubview:self.countedRareTextField];
    [self.countedRareTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.dismissalTextField.mas_bottom).offset(containsGallonEditShortcutsBlack);
        make.left.right.equalTo(self.dismissalTextField);
        make.height.mas_equalTo(ButPhonetic.ditheredFast.capacityHair);
    }];
    
    
    UIImageView *optionImageView = nil;
    if ([self.tiedDecibel[1] length] > 0) {
        
        optionImageView = [[UIImageView alloc] init];
        optionImageView.backgroundColor = UIColor.lightGrayColor;
        optionImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:optionImageView];
        [optionImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.countedRareTextField.mas_bottom).offset(containsGallonEditShortcutsBlack);
            make.width.mas_equalTo(self.countedRareTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.offReversedImageView = optionImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.tiedDecibel[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(), ^{
                optionImageView.image = image2;
                CGFloat glyph = image2.size.height / image2.size.width;
                [optionImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((ButPhonetic.ditheredFast.oldComponentScrolledIntegerDeltaWidth -ButPhonetic.ditheredFast.lockRowChain*2)*glyph);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.offReversedImageView ? self.offReversedImageView.frame.size.height + ButPhonetic.ditheredFast.barsBouncing +ButPhonetic.ditheredFast.serialProgramFaceInhalerAllForbid : ButPhonetic.ditheredFast.serialProgramFaceInhalerAllForbid;
                    
                    make.size.mas_equalTo(CGSizeMake(ButPhonetic.ditheredFast.oldComponentScrolledIntegerDeltaWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.offReversedImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.offReversedImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *unitDeltaButton = [ButPhonetic maximumYearsVoiceEscapePrecisionColor:ButPhonetic.snowTabWhoDrum.landscapePurpleDetailsIncrementDirection];
    [unitDeltaButton addTarget:self action:@selector(nearbyLandscapeDispatchCheckTorchFocusing:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:unitDeltaButton];
    [unitDeltaButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-ButPhonetic.ditheredFast.barrierStair);
        make.left.right.equalTo(self.dismissalTextField);
        make.height.mas_equalTo(ButPhonetic.ditheredFast.gramTableFat);
    }];
    
}

- (void)nearbyLandscapeDispatchCheckTorchFocusing:(id)sender {
if (self.dismissalTextField.text.sobBagFriend || self.countedRareTextField.text.sobBagFriend) {
        [EyeAlertView layoutCupSetupBuiltSurfaceRank:ButPhonetic.snowTabWhoDrum.tamilHash message:ButPhonetic.snowTabWhoDrum.maySequencerOverSuspendedImproperExhausted completion:nil];
        return;
    }
    if ([self.lowWinWarpBut respondsToSelector:@selector(conductorSegmentedNotSwapSummarySlovakWithName:netBad:completion:)]) {
        [HallOldestView proximityMealWindow];
        [self.lowWinWarpBut conductorSegmentedNotSwapSummarySlovakWithName:self.dismissalTextField.text netBad:self.countedRareTextField.text completion:^(id object) {
            [HallOldestView tryReclaimHertzThirteenCupWindow];
            if ([object boolValue]) {
                [[WasFillerManager shared] saltTrailingWindow];
                [MidToast capMildTip:ButPhonetic.snowTabWhoDrum.eitherMonotonicDroppedBigDingbatsExplicit];
            }
        }];
    }
}

@end
