






#import "DitheredGuideViewController.h"
#import "KinToast.h"
#import "VisualInfo.h"

@interface DitheredGuideViewController ()

@property (nonatomic, strong) UIImageView *recoveredView;
@property (nonatomic, strong) UIButton *rebusIcyFatButton;
@property (nonatomic, strong) UIView *golfNeverView;
@property (nonatomic, strong) UILabel *sheUsageLabel;
@property (nonatomic, strong) UITextField *sensorSheIcyTextField;
@property (nonatomic, strong) UITextField *mouthPinkQuitTextField;
@end

@implementation DitheredGuideViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.blobLogKinButton.hidden = YES;
    
    if ([VisualInfo tradHellmanCervicalNotDenyImage]) {
        self.recoveredView = [[UIImageView alloc] initWithImage:[VisualInfo tradHellmanCervicalNotDenyImage]];
        [self.view addSubview:self.recoveredView];
        self.recoveredView.hidden = YES;
        [self.recoveredView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(FixMaterial.capsLoopsAge.maxCurlGuest);
            make.left.equalTo(self.vowelMostButton.mas_right);
            make.top.equalTo(self.view).offset(FixMaterial.capsLoopsAge.expiredBuilt);
        }];
    }
    
    self.golfNeverView = [FixMaterial golfNeverView];
    self.golfNeverView.hidden = YES;
    [self.view addSubview:self.golfNeverView];
    [self.golfNeverView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([VisualInfo tradHellmanCervicalNotDenyImage]) {
            make.centerY.equalTo(self.recoveredView);
            make.left.equalTo(self.recoveredView.mas_right).offset(FixMaterial.capsLoopsAge.bloodZipOld);
        }else {
            make.top.equalTo(self.view).offset(FixMaterial.capsLoopsAge.expiredBuilt);
            make.left.equalTo(self.vowelMostButton.mas_right).offset(FixMaterial.capsLoopsAge.bloodZipOld);
        }
        make.right.equalTo(self.blobLogKinButton.mas_left);
        make.height.mas_equalTo(FixMaterial.capsLoopsAge.maxCurlGuest);
    }];
    
    self.sheUsageLabel = [FixMaterial waistMarkTurnEventElder:FixMaterial.dryMicroCapTag.parentalParameterUnlockTightBirth];
    self.sheUsageLabel.numberOfLines = 0;
    [self.view addSubview:self.sheUsageLabel];
    [self.sheUsageLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(FixMaterial.capsLoopsAge.offBarInvoke);
        make.left.mas_equalTo(FixMaterial.capsLoopsAge.sayDomainCup);
        make.right.mas_equalTo(-FixMaterial.capsLoopsAge.sayDomainCup);
    }];
    
    
    self.sensorSheIcyTextField = [FixMaterial wordStylisticSequenceSideSearchAccount];
    self.sensorSheIcyTextField.enabled = NO;
    self.sensorSheIcyTextField.text = self.sexDeclined[FixMaterial.capsLoopsAge.mouthOnePenName];
    [self infoUnderageFunkTripleDominantSuchView:self.sensorSheIcyTextField text:FixMaterial.dryMicroCapTag.cookiesCacheMasteringLockingGram];
    [self.view addSubview:self.sensorSheIcyTextField];
    [self.sensorSheIcyTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.sheUsageLabel.mas_bottom).offset(FixMaterial.capsLoopsAge.builtChinese);
        make.left.mas_equalTo(FixMaterial.capsLoopsAge.niacinDegree);
        make.right.mas_equalTo(-FixMaterial.capsLoopsAge.niacinDegree);
        make.height.mas_equalTo(FixMaterial.capsLoopsAge.rearrangeSin);
    }];
    
    
    self.mouthPinkQuitTextField = [FixMaterial wordStylisticSequenceSideSearchAccount];
    self.mouthPinkQuitTextField.enabled = NO;
    self.mouthPinkQuitTextField.text = self.sexDeclined[FixMaterial.capsLoopsAge.gainRawNeedKey];
    [self infoUnderageFunkTripleDominantSuchView:self.mouthPinkQuitTextField text:FixMaterial.dryMicroCapTag.answerPressedProcessedUnpluggedRed];
    [self.view addSubview:self.mouthPinkQuitTextField];
    [self.mouthPinkQuitTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.sensorSheIcyTextField.mas_bottom).offset(FixMaterial.capsLoopsAge.builtChinese);
        make.left.right.equalTo(self.sensorSheIcyTextField);
        make.height.mas_equalTo(FixMaterial.capsLoopsAge.rearrangeSin);
    }];
    
    
    UIButton *baselinesButton = [FixMaterial rangeSeeHectaresImproperLowercaseColor:FixMaterial.dryMicroCapTag.exitsRaceDifferentSeasonShort];
    [baselinesButton addTarget:self action:@selector(terahertzBuiltLearnedDayAnonymousAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:baselinesButton];
    [baselinesButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mouthPinkQuitTextField.mas_bottom).offset(FixMaterial.capsLoopsAge.builtChinese);
        make.left.right.equalTo(self.mouthPinkQuitTextField);
        make.height.mas_equalTo(FixMaterial.capsLoopsAge.maxCurlGuest);
    }];
    
    
    self.rebusIcyFatButton = [FixMaterial slantMilesSexSessionDocuments:FixMaterial.dryMicroCapTag.suspendedFeetDecreaseOuterFactOverwrite];
    [self.rebusIcyFatButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.rebusIcyFatButton addTarget:self action:@selector(afterResponseBloodCaptionContainedAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.rebusIcyFatButton];
    [self.rebusIcyFatButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(baselinesButton.mas_bottom).offset(FixMaterial.capsLoopsAge.hexMutation);
        make.centerX.equalTo(self.view);
    }];
}

- (void)infoUnderageFunkTripleDominantSuchView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(FixMaterial.capsLoopsAge.maxCurlGuest, FixMaterial.capsLoopsAge.rearrangeSin)};
    UILabel *flipFace = [[UILabel alloc] initWithFrame:frame];
    flipFace.text = text;
    flipFace.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = flipFace;
}

- (void)afterResponseBloodCaptionContainedAction:(UIButton *)sender {
    [[NextBeganManager shared] goalBreakingOddSubtractUnderlineSawViewController:self.navigationController];
}

- (void)terahertzBuiltLearnedDayAnonymousAction:(UIButton *)sender {
    sender.hidden = YES;
    self.sheUsageLabel.hidden = YES;
    self.golfNeverView.hidden = NO;
    self.recoveredView.hidden = NO;
    self.rebusIcyFatButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(FixMaterial.capsLoopsAge.ambientTeluguBlackInstancesLockWidth, FixMaterial.capsLoopsAge.boxTakeTouchMoreOneEnvelope-FixMaterial.capsLoopsAge.dropCanDance));
    }];
    [self.sensorSheIcyTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.golfNeverView.mas_bottom).offset(FixMaterial.capsLoopsAge.builtChinese);
    }];
    [self.view layoutIfNeeded];
    
    BOOL every = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:FixMaterial.capsLoopsAge.popRedoMathHexEffectDatabaseLatvian];
    if (!every) {
        self.blobLogKinButton.hidden = NO;
        [BinAlertView bigUnboundedMaintainUnpluggedTargetGrouped:nil message:FixMaterial.dryMicroCapTag.cutoffCardSolveSignatureForever completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= FixMaterial.capsLoopsAge.askLocalized;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:nowArrowAdoptRestIndirectIndent:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image nowArrowAdoptRestIndirectIndent:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[NextBeganManager shared] goalBreakingOddSubtractUnderlineSawViewController:self.navigationController];
        [KinToast eyeNear:FixMaterial.dryMicroCapTag.masterComplexFaeroesePeopleGreater];
    }else {
        self.blobLogKinButton.hidden = NO;
        [BinAlertView bigUnboundedMaintainUnpluggedTargetGrouped:nil message:FixMaterial.dryMicroCapTag.cutoffCardSolveSignatureForever completion:nil];
    }
}

@end
