






#import "DueTiedHisZipViewController.h"
#import "ItsToast.h"
#import "WhoEggInfo.h"

@interface DueTiedHisZipViewController ()

@property (nonatomic, strong) UIImageView *pinkEvictView;
@property (nonatomic, strong) UIButton *linearlyHasButton;
@property (nonatomic, strong) UIView *sayHelperView;
@property (nonatomic, strong) UILabel *blackSonLabel;
@property (nonatomic, strong) UITextField *hangFatalOffTextField;
@property (nonatomic, strong) UITextField *breakWaxPieceTextField;
@end

@implementation DueTiedHisZipViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.sexSeedSayButton.hidden = YES;
    
    if ([WhoEggInfo handshakeFastestLineLighterFunImage]) {
        self.pinkEvictView = [[UIImageView alloc] initWithImage:[WhoEggInfo handshakeFastestLineLighterFunImage]];
        [self.view addSubview:self.pinkEvictView];
        self.pinkEvictView.hidden = YES;
        [self.pinkEvictView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(SafariFloor.wakeTrustDay.emailAnchors);
            make.left.equalTo(self.yahooFoldButton.mas_right);
            make.top.equalTo(self.view).offset(SafariFloor.wakeTrustDay.restEuropean);
        }];
    }
    
    self.sayHelperView = [SafariFloor sayHelperView];
    self.sayHelperView.hidden = YES;
    [self.view addSubview:self.sayHelperView];
    [self.sayHelperView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([WhoEggInfo handshakeFastestLineLighterFunImage]) {
            make.centerY.equalTo(self.pinkEvictView);
            make.left.equalTo(self.pinkEvictView.mas_right).offset(SafariFloor.wakeTrustDay.queryOutArt);
        }else {
            make.top.equalTo(self.view).offset(SafariFloor.wakeTrustDay.restEuropean);
            make.left.equalTo(self.yahooFoldButton.mas_right).offset(SafariFloor.wakeTrustDay.queryOutArt);
        }
        make.right.equalTo(self.sexSeedSayButton.mas_left);
        make.height.mas_equalTo(SafariFloor.wakeTrustDay.emailAnchors);
    }];
    
    self.blackSonLabel = [SafariFloor bypassedNeverDisallowTransmitHandover:SafariFloor.issueExecSlide.replyStalledReportsSpanMouse];
    self.blackSonLabel.numberOfLines = 0;
    [self.view addSubview:self.blackSonLabel];
    [self.blackSonLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(SafariFloor.wakeTrustDay.futureUseBed);
        make.left.mas_equalTo(SafariFloor.wakeTrustDay.sheStatement);
        make.right.mas_equalTo(-SafariFloor.wakeTrustDay.sheStatement);
    }];
    
    
    self.hangFatalOffTextField = [SafariFloor wrappersPurposeMediaTradCoulombsAccount];
    self.hangFatalOffTextField.enabled = NO;
    self.hangFatalOffTextField.text = self.bandScanned[SafariFloor.wakeTrustDay.sunHangHoldName];
    [self allArmContextGreekRopeSpacingView:self.hangFatalOffTextField text:SafariFloor.issueExecSlide.helpersChangingMenstrualCoercionCorrupt];
    [self.view addSubview:self.hangFatalOffTextField];
    [self.hangFatalOffTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.blackSonLabel.mas_bottom).offset(SafariFloor.wakeTrustDay.barAwakePipe);
        make.left.mas_equalTo(SafariFloor.wakeTrustDay.eastSobOrder);
        make.right.mas_equalTo(-SafariFloor.wakeTrustDay.eastSobOrder);
        make.height.mas_equalTo(SafariFloor.wakeTrustDay.biotinRecord);
    }];
    
    
    self.breakWaxPieceTextField = [SafariFloor wrappersPurposeMediaTradCoulombsAccount];
    self.breakWaxPieceTextField.enabled = NO;
    self.breakWaxPieceTextField.text = self.bandScanned[SafariFloor.wakeTrustDay.netDownhillKey];
    [self allArmContextGreekRopeSpacingView:self.breakWaxPieceTextField text:SafariFloor.issueExecSlide.varianceYetPrincipalPreventsCookies];
    [self.view addSubview:self.breakWaxPieceTextField];
    [self.breakWaxPieceTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.hangFatalOffTextField.mas_bottom).offset(SafariFloor.wakeTrustDay.barAwakePipe);
        make.left.right.equalTo(self.hangFatalOffTextField);
        make.height.mas_equalTo(SafariFloor.wakeTrustDay.biotinRecord);
    }];
    
    
    UIButton *tooCelticButton = [SafariFloor spatialVerticalTaskMidTradColor:SafariFloor.issueExecSlide.slideHandledSongEntropyDash];
    [tooCelticButton addTarget:self action:@selector(changedGroupTipPointMixAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:tooCelticButton];
    [tooCelticButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.breakWaxPieceTextField.mas_bottom).offset(SafariFloor.wakeTrustDay.barAwakePipe);
        make.left.right.equalTo(self.breakWaxPieceTextField);
        make.height.mas_equalTo(SafariFloor.wakeTrustDay.emailAnchors);
    }];
    
    
    self.linearlyHasButton = [SafariFloor copperLeaveNeutralDetectionHandover:SafariFloor.issueExecSlide.sonTapSpatialLooperDragDeferring];
    [self.linearlyHasButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.linearlyHasButton addTarget:self action:@selector(taskPressHybridSummariesGallonsAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.linearlyHasButton];
    [self.linearlyHasButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(tooCelticButton.mas_bottom).offset(SafariFloor.wakeTrustDay.indentTilde);
        make.centerX.equalTo(self.view);
    }];
}

- (void)allArmContextGreekRopeSpacingView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(SafariFloor.wakeTrustDay.emailAnchors, SafariFloor.wakeTrustDay.biotinRecord)};
    UILabel *icyTwist = [[UILabel alloc] initWithFrame:frame];
    icyTwist.text = text;
    icyTwist.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = icyTwist;
}

- (void)taskPressHybridSummariesGallonsAction:(UIButton *)sender {
    [[InlandDidManager shared] startMathTrackElapsedLocalClampViewController:self.navigationController];
}

- (void)changedGroupTipPointMixAction:(UIButton *)sender {
    sender.hidden = YES;
    self.blackSonLabel.hidden = YES;
    self.sayHelperView.hidden = NO;
    self.pinkEvictView.hidden = NO;
    self.linearlyHasButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(SafariFloor.wakeTrustDay.elementsChunkPurchasedSumLookWidth, SafariFloor.wakeTrustDay.appendHueBeganFaceInfoLoss-SafariFloor.wakeTrustDay.boxSelection));
    }];
    [self.hangFatalOffTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.sayHelperView.mas_bottom).offset(SafariFloor.wakeTrustDay.barAwakePipe);
    }];
    [self.view layoutIfNeeded];
    
    BOOL legal = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:SafariFloor.wakeTrustDay.foggyUseMisplacedCheckoutCreditsTomorrowEntities];
    if (!legal) {
        self.sexSeedSayButton.hidden = NO;
        [HerAlertView highestTopOutletPeakGetOdd:nil message:SafariFloor.issueExecSlide.howSecondsStepMidPrefer completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= SafariFloor.wakeTrustDay.popBevelClip;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:jumpProvidingPlayableOddQueuePin:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image jumpProvidingPlayableOddQueuePin:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[InlandDidManager shared] startMathTrackElapsedLocalClampViewController:self.navigationController];
        [ItsToast tagalog:SafariFloor.issueExecSlide.cancelingRadialBusQuietObserver];
    }else {
        self.sexSeedSayButton.hidden = NO;
        [HerAlertView highestTopOutletPeakGetOdd:nil message:SafariFloor.issueExecSlide.howSecondsStepMidPrefer completion:nil];
    }
}

@end
