






#import "DogAgePlusOneViewController.h"
#import "LawToast.h"
#import "PinTopInfo.h"

@interface DogAgePlusOneViewController ()

@property (nonatomic, strong) UIImageView *queryPaceView;
@property (nonatomic, strong) UIButton *greaterPassButton;
@property (nonatomic, strong) UIView *modifiersView;
@property (nonatomic, strong) UILabel *retQueryLabel;
@property (nonatomic, strong) UITextField *greenRedPastTextField;
@property (nonatomic, strong) UITextField *singleGuaraniTextField;
@end

@implementation DogAgePlusOneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.fairTargetButton.hidden = YES;
    
    if ([PinTopInfo armDecayDecryptThousandAutoImage]) {
        self.queryPaceView = [[UIImageView alloc] initWithImage:[PinTopInfo armDecayDecryptThousandAutoImage]];
        [self.view addSubview:self.queryPaceView];
        self.queryPaceView.hidden = YES;
        [self.queryPaceView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(AreStateWon.twoHoverHard.sonGenderSin);
            make.left.equalTo(self.returnOptButton.mas_right);
            make.top.equalTo(self.view).offset(AreStateWon.twoHoverHard.knowShapeSay);
        }];
    }
    
    self.modifiersView = [AreStateWon modifiersView];
    self.modifiersView.hidden = YES;
    [self.view addSubview:self.modifiersView];
    [self.modifiersView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([PinTopInfo armDecayDecryptThousandAutoImage]) {
            make.centerY.equalTo(self.queryPaceView);
            make.left.equalTo(self.queryPaceView.mas_right).offset(AreStateWon.twoHoverHard.agePoloBoth);
        }else {
            make.top.equalTo(self.view).offset(AreStateWon.twoHoverHard.knowShapeSay);
            make.left.equalTo(self.returnOptButton.mas_right).offset(AreStateWon.twoHoverHard.agePoloBoth);
        }
        make.right.equalTo(self.fairTargetButton.mas_left);
        make.height.mas_equalTo(AreStateWon.twoHoverHard.sonGenderSin);
    }];
    
    self.retQueryLabel = [AreStateWon visitorRhythmFitnessBitmapTint:AreStateWon.miterTabBitKin.safeAbsentConvertAmbienceThin];
    self.retQueryLabel.numberOfLines = 0;
    [self.view addSubview:self.retQueryLabel];
    [self.retQueryLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(AreStateWon.twoHoverHard.kirghizDaily);
        make.left.mas_equalTo(AreStateWon.twoHoverHard.slightEraMax);
        make.right.mas_equalTo(-AreStateWon.twoHoverHard.slightEraMax);
    }];
    
    
    self.greenRedPastTextField = [AreStateWon degreesAgeWetBrushDomainAccount];
    self.greenRedPastTextField.enabled = NO;
    self.greenRedPastTextField.text = self.lawBoldSeed[AreStateWon.twoHoverHard.callDefaultName];
    [self radixSequencesFeaturesResetSizeInsertedView:self.greenRedPastTextField text:AreStateWon.miterTabBitKin.putMiddleTabularVitalTop];
    [self.view addSubview:self.greenRedPastTextField];
    [self.greenRedPastTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.retQueryLabel.mas_bottom).offset(AreStateWon.twoHoverHard.ironFocusAdd);
        make.left.mas_equalTo(AreStateWon.twoHoverHard.cameraWaxOwn);
        make.right.mas_equalTo(-AreStateWon.twoHoverHard.cameraWaxOwn);
        make.height.mas_equalTo(AreStateWon.twoHoverHard.tipTipNormal);
    }];
    
    
    self.singleGuaraniTextField = [AreStateWon degreesAgeWetBrushDomainAccount];
    self.singleGuaraniTextField.enabled = NO;
    self.singleGuaraniTextField.text = self.lawBoldSeed[AreStateWon.twoHoverHard.tintBadPongKey];
    [self radixSequencesFeaturesResetSizeInsertedView:self.singleGuaraniTextField text:AreStateWon.miterTabBitKin.adaptiveKirghizSheDogExecuting];
    [self.view addSubview:self.singleGuaraniTextField];
    [self.singleGuaraniTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.greenRedPastTextField.mas_bottom).offset(AreStateWon.twoHoverHard.ironFocusAdd);
        make.left.right.equalTo(self.greenRedPastTextField);
        make.height.mas_equalTo(AreStateWon.twoHoverHard.tipTipNormal);
    }];
    
    
    UIButton *binaryHerButton = [AreStateWon safePromisedRequiringAdjustsIrishColor:AreStateWon.miterTabBitKin.delayFemalePermanentUnsafeAffine];
    [binaryHerButton addTarget:self action:@selector(acuteProducingCityLateDeletionAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:binaryHerButton];
    [binaryHerButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.singleGuaraniTextField.mas_bottom).offset(AreStateWon.twoHoverHard.ironFocusAdd);
        make.left.right.equalTo(self.singleGuaraniTextField);
        make.height.mas_equalTo(AreStateWon.twoHoverHard.sonGenderSin);
    }];
    
    
    self.greaterPassButton = [AreStateWon controlsWalkingPresentedGrowEquality:AreStateWon.miterTabBitKin.indentRegisterSemaphoreNeverUptimeNordic];
    [self.greaterPassButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.greaterPassButton addTarget:self action:@selector(neutralOrdinalsBeatRadioActionsAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.greaterPassButton];
    [self.greaterPassButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(binaryHerButton.mas_bottom).offset(AreStateWon.twoHoverHard.areSpaTeeth);
        make.centerX.equalTo(self.view);
    }];
}

- (void)radixSequencesFeaturesResetSizeInsertedView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(AreStateWon.twoHoverHard.sonGenderSin, AreStateWon.twoHoverHard.tipTipNormal)};
    UILabel *zoomWalk = [[UILabel alloc] initWithFrame:frame];
    zoomWalk.text = text;
    zoomWalk.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = zoomWalk;
}

- (void)neutralOrdinalsBeatRadioActionsAction:(UIButton *)sender {
    [[LocationsManager shared] recorderShowingForbidRowDescendReferenceViewController:self.navigationController];
}

- (void)acuteProducingCityLateDeletionAction:(UIButton *)sender {
    sender.hidden = YES;
    self.retQueryLabel.hidden = YES;
    self.modifiersView.hidden = NO;
    self.queryPaceView.hidden = NO;
    self.greaterPassButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(AreStateWon.twoHoverHard.climbedElapsedEncodingArmourExporterWidth, AreStateWon.twoHoverHard.sortingPhaseBrokenRootBreakDiscard-AreStateWon.twoHoverHard.sixSocketBus));
    }];
    [self.greenRedPastTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.modifiersView.mas_bottom).offset(AreStateWon.twoHoverHard.ironFocusAdd);
    }];
    [self.view layoutIfNeeded];
    
    BOOL trash = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:AreStateWon.twoHoverHard.beginningLatitudeBuildInferTwoIntentsExtending];
    if (!trash) {
        self.fairTargetButton.hidden = NO;
        [ItsAlertView messageSheetDownhillBalanceImpactMan:nil message:AreStateWon.miterTabBitKin.topMixYouFinishingUpdate completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= AreStateWon.twoHoverHard.hailMinExits;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:passwordsCommonProgressCarBiometryMen:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image passwordsCommonProgressCarBiometryMen:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[LocationsManager shared] recorderShowingForbidRowDescendReferenceViewController:self.navigationController];
        [LawToast putTask:AreStateWon.miterTabBitKin.maintainStrokeHowWayResume];
    }else {
        self.fairTargetButton.hidden = NO;
        [ItsAlertView messageSheetDownhillBalanceImpactMan:nil message:AreStateWon.miterTabBitKin.topMixYouFinishingUpdate completion:nil];
    }
}

@end
