






#import "NameEndUndoViewController.h"
#import "SDWebImageManager.h"
#import "WasToast.h"
#import "NSString+NonceBeen.h"

@interface NameEndUndoViewController ()

@property (nonatomic, strong) UIImageView *dragHardWaxImageView;
@property (nonatomic, strong) UITextField *separatedTextField;
@property (nonatomic, strong) UITextField *disorderOurTextField;

@end

@implementation NameEndUndoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.busExtractButton.hidden = [self.panoramaEra[0] boolValue];
    
    CGFloat ourOffRemainingRespectsExtra = SubBondFour.nodeFourteen.dogStackWait;
    
    UILabel *cupLabel = [SubBondFour wetBaseLevelConfirmOptimize:SubBondFour.injectionBlack.nowStylusMillionOpticalAssume];
    cupLabel.numberOfLines = 0;
    [self.view addSubview:cupLabel];
    [cupLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(SubBondFour.nodeFourteen.makeSliceKey);
        make.left.mas_equalTo(SubBondFour.nodeFourteen.masteringLaw);
        make.right.mas_equalTo(-SubBondFour.nodeFourteen.masteringLaw);
    }];
    
    
    self.separatedTextField = [SubBondFour howFeaturedField:SubBondFour.injectionBlack.youGreenExpiresYetPluralSob isSecure:NO];
    [self.view addSubview:self.separatedTextField];
    [self.separatedTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(cupLabel.mas_bottom).offset(ourOffRemainingRespectsExtra);
        make.left.mas_equalTo(SubBondFour.nodeFourteen.mustKashmiri);
        make.right.mas_equalTo(-SubBondFour.nodeFourteen.mustKashmiri);
        make.height.mas_equalTo(SubBondFour.nodeFourteen.extendingPop);
    }];
    
    
    self.disorderOurTextField = [SubBondFour howFeaturedField:SubBondFour.injectionBlack.forwardsCutGlobalAffectingFlowEight isSecure:NO];;
    [self.view addSubview:self.disorderOurTextField];
    [self.disorderOurTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.separatedTextField.mas_bottom).offset(ourOffRemainingRespectsExtra);
        make.left.right.equalTo(self.separatedTextField);
        make.height.mas_equalTo(SubBondFour.nodeFourteen.extendingPop);
    }];
    
    
    UIImageView *sonMayImageView = nil;
    if ([self.panoramaEra[1] length] > 0) {
        
        sonMayImageView = [[UIImageView alloc] init];
        sonMayImageView.backgroundColor = UIColor.lightGrayColor;
        sonMayImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:sonMayImageView];
        [sonMayImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.disorderOurTextField.mas_bottom).offset(ourOffRemainingRespectsExtra);
            make.width.mas_equalTo(self.disorderOurTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.dragHardWaxImageView = sonMayImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.panoramaEra[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(), ^{
                sonMayImageView.image = image2;
                CGFloat bleed = image2.size.height / image2.size.width;
                [sonMayImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((SubBondFour.nodeFourteen.skippedOrderingCapDiacriticCaptureWidth -SubBondFour.nodeFourteen.mustKashmiri*2)*bleed);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.dragHardWaxImageView ? self.dragHardWaxImageView.frame.size.height + SubBondFour.nodeFourteen.dogStackWait +SubBondFour.nodeFourteen.returningRevertRelayReversedOutThreads : SubBondFour.nodeFourteen.returningRevertRelayReversedOutThreads;
                    
                    make.size.mas_equalTo(CGSizeMake(SubBondFour.nodeFourteen.skippedOrderingCapDiacriticCaptureWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.dragHardWaxImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.dragHardWaxImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *developerButton = [SubBondFour certDateSlovakDisablingTalkColor:SubBondFour.injectionBlack.abnormalBleedEnhancedTropicalRecord];
    [developerButton addTarget:self action:@selector(addressHistoryCadenceSquaredModifiedPlug:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:developerButton];
    [developerButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-SubBondFour.nodeFourteen.feedSeeBasic);
        make.left.right.equalTo(self.separatedTextField);
        make.height.mas_equalTo(SubBondFour.nodeFourteen.greekAverage);
    }];
    
}

- (void)addressHistoryCadenceSquaredModifiedPlug:(id)sender {
if (self.separatedTextField.text.barOwnership || self.disorderOurTextField.text.barOwnership) {
        [HerAlertView peakKilohertzRepeatsModerateCaretIntent:SubBondFour.injectionBlack.logGolden message:SubBondFour.injectionBlack.obsoleteBengaliRequiringBoostTipContexts completion:nil];
        return;
    }
    if ([self.taskCharUnify respondsToSelector:@selector(assetScopeStalledRegisterPermanentMinorWithName:darker:completion:)]) {
        [FitCalorieView waistEraThreeWindow];
        [self.taskCharUnify assetScopeStalledRegisterPermanentMinorWithName:self.separatedTextField.text darker:self.disorderOurTextField.text completion:^(id object) {
            [FitCalorieView invertedListenMinOurOverdueWindow];
            if ([object boolValue]) {
                [[KeysVoiceManager shared] hailTargetedWindow];
                [WasToast boxSerbian:SubBondFour.injectionBlack.biometryHeadsetWhoSymbolsFrequencyIts];
            }
        }];
    }
}

@end
