






#import "PlanHowManSobViewController.h"
#import "PanToast.h"
#import "ActiveInfo.h"

@interface PlanHowManSobViewController ()

@property (nonatomic, strong) UIImageView *toolAuditView;
@property (nonatomic, strong) UIButton *unlearnRateButton;
@property (nonatomic, strong) UIView *preferredView;
@property (nonatomic, strong) UILabel *invertedLabel;
@property (nonatomic, strong) UITextField *selectorSentTextField;
@property (nonatomic, strong) UITextField *reductionGoalTextField;
@end

@implementation PlanHowManSobViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.coverStandButton.hidden = YES;
    
    if ([ActiveInfo foundSeekingTwitterRaceCelsiusImage]) {
        self.toolAuditView = [[UIImageView alloc] initWithImage:[ActiveInfo foundSeekingTwitterRaceCelsiusImage]];
        [self.view addSubview:self.toolAuditView];
        self.toolAuditView.hidden = YES;
        [self.toolAuditView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(BinFaxEight.icyAboutDrum.barsMightBig);
            make.left.equalTo(self.eggSignerButton.mas_right);
            make.top.equalTo(self.view).offset(BinFaxEight.icyAboutDrum.pubAlignBeat);
        }];
    }
    
    self.preferredView = [BinFaxEight preferredView];
    self.preferredView.hidden = YES;
    [self.view addSubview:self.preferredView];
    [self.preferredView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([ActiveInfo foundSeekingTwitterRaceCelsiusImage]) {
            make.centerY.equalTo(self.toolAuditView);
            make.left.equalTo(self.toolAuditView.mas_right).offset(BinFaxEight.icyAboutDrum.howShakeSix);
        }else {
            make.top.equalTo(self.view).offset(BinFaxEight.icyAboutDrum.pubAlignBeat);
            make.left.equalTo(self.eggSignerButton.mas_right).offset(BinFaxEight.icyAboutDrum.howShakeSix);
        }
        make.right.equalTo(self.coverStandButton.mas_left);
        make.height.mas_equalTo(BinFaxEight.icyAboutDrum.barsMightBig);
    }];
    
    self.invertedLabel = [BinFaxEight uploadedConditionStaleCityBig:BinFaxEight.signRoomModify.overBandAskMinExpire];
    self.invertedLabel.numberOfLines = 0;
    [self.view addSubview:self.invertedLabel];
    [self.invertedLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BinFaxEight.icyAboutDrum.zipStayBevel);
        make.left.mas_equalTo(BinFaxEight.icyAboutDrum.croppingHand);
        make.right.mas_equalTo(-BinFaxEight.icyAboutDrum.croppingHand);
    }];
    
    
    self.selectorSentTextField = [BinFaxEight taskBehaviorsSkippedWarnWakeAccount];
    self.selectorSentTextField.enabled = NO;
    self.selectorSentTextField.text = self.givenBarRet[BinFaxEight.icyAboutDrum.eyeEasyLeftName];
    [self symmetricGreatMidStandardBoundBadView:self.selectorSentTextField text:BinFaxEight.signRoomModify.baselineBadmintonGradeVectorRejection];
    [self.view addSubview:self.selectorSentTextField];
    [self.selectorSentTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.invertedLabel.mas_bottom).offset(BinFaxEight.icyAboutDrum.masterMinCap);
        make.left.mas_equalTo(BinFaxEight.icyAboutDrum.substringSaw);
        make.right.mas_equalTo(-BinFaxEight.icyAboutDrum.substringSaw);
        make.height.mas_equalTo(BinFaxEight.icyAboutDrum.containerHas);
    }];
    
    
    self.reductionGoalTextField = [BinFaxEight taskBehaviorsSkippedWarnWakeAccount];
    self.reductionGoalTextField.enabled = NO;
    self.reductionGoalTextField.text = self.givenBarRet[BinFaxEight.icyAboutDrum.slashedLossKey];
    [self symmetricGreatMidStandardBoundBadView:self.reductionGoalTextField text:BinFaxEight.signRoomModify.handRedefinedHasTodayOrdinals];
    [self.view addSubview:self.reductionGoalTextField];
    [self.reductionGoalTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.selectorSentTextField.mas_bottom).offset(BinFaxEight.icyAboutDrum.masterMinCap);
        make.left.right.equalTo(self.selectorSentTextField);
        make.height.mas_equalTo(BinFaxEight.icyAboutDrum.containerHas);
    }];
    
    
    UIButton *gigahertzButton = [BinFaxEight ratingsIndigoNumeratorRenameBrokenColor:BinFaxEight.signRoomModify.mealDuplicateLegacyMagnitudeCut];
    [gigahertzButton addTarget:self action:@selector(combineBadGeneratorCancelledHashAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:gigahertzButton];
    [gigahertzButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.reductionGoalTextField.mas_bottom).offset(BinFaxEight.icyAboutDrum.masterMinCap);
        make.left.right.equalTo(self.reductionGoalTextField);
        make.height.mas_equalTo(BinFaxEight.icyAboutDrum.barsMightBig);
    }];
    
    
    self.unlearnRateButton = [BinFaxEight slowRectumOddScrollingMaker:BinFaxEight.signRoomModify.triggerMenPlanLaotianLayoutSignal];
    [self.unlearnRateButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.unlearnRateButton addTarget:self action:@selector(buttonVectorOldestFutureSynthesisAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.unlearnRateButton];
    [self.unlearnRateButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(gigahertzButton.mas_bottom).offset(BinFaxEight.icyAboutDrum.lemmaFixNet);
        make.centerX.equalTo(self.view);
    }];
}

- (void)symmetricGreatMidStandardBoundBadView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(BinFaxEight.icyAboutDrum.barsMightBig, BinFaxEight.icyAboutDrum.containerHas)};
    UILabel *useAgent = [[UILabel alloc] initWithFrame:frame];
    useAgent.text = text;
    useAgent.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = useAgent;
}

- (void)buttonVectorOldestFutureSynthesisAction:(UIButton *)sender {
    [[BalticFixManager shared] eyeScaleGeometryBrownStableForceViewController:self.navigationController];
}

- (void)combineBadGeneratorCancelledHashAction:(UIButton *)sender {
    sender.hidden = YES;
    self.invertedLabel.hidden = YES;
    self.preferredView.hidden = NO;
    self.toolAuditView.hidden = NO;
    self.unlearnRateButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(BinFaxEight.icyAboutDrum.logPacketsUrgentNapBestWidth, BinFaxEight.icyAboutDrum.toggleOperateInitiatedCarExternalFootball-BinFaxEight.icyAboutDrum.canTagEleven));
    }];
    [self.selectorSentTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.preferredView.mas_bottom).offset(BinFaxEight.icyAboutDrum.masterMinCap);
    }];
    [self.view layoutIfNeeded];
    
    BOOL lease = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:BinFaxEight.icyAboutDrum.selectDeprecatePastMagicPreciseBalticBig];
    if (!lease) {
        self.coverStandButton.hidden = NO;
        [WonAlertView terminalRetryCopperBookmarksRemainingIdle:nil message:BinFaxEight.signRoomModify.tailSenderMasteringSilencedThe completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= BinFaxEight.icyAboutDrum.burnBoxPhoto;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:dependingZipSourcePlaybackCubeLeap:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image dependingZipSourcePlaybackCubeLeap:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[BalticFixManager shared] eyeScaleGeometryBrownStableForceViewController:self.navigationController];
        [PanToast laotian:BinFaxEight.signRoomModify.indianCommitIndexedTrashKelvin];
    }else {
        self.coverStandButton.hidden = NO;
        [WonAlertView terminalRetryCopperBookmarksRemainingIdle:nil message:BinFaxEight.signRoomModify.tailSenderMasteringSilencedThe completion:nil];
    }
}

@end
