






#import "EulerPaperCanViewController.h"
#import "SubToast.h"
#import "CatYouInfo.h"

@interface EulerPaperCanViewController ()

@property (nonatomic, strong) UIImageView *basicLiveView;
@property (nonatomic, strong) UIButton *passWorkPenButton;
@property (nonatomic, strong) UIView *peakBadgeView;
@property (nonatomic, strong) UILabel *oneScaleLabel;
@property (nonatomic, strong) UITextField *figureUndoneTextField;
@property (nonatomic, strong) UITextField *reactorSomaliTextField;
@end

@implementation EulerPaperCanViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.carIcyMaleButton.hidden = YES;
    
    if ([CatYouInfo instantCancelsSeasonFaxOffImage]) {
        self.basicLiveView = [[UIImageView alloc] initWithImage:[CatYouInfo instantCancelsSeasonFaxOffImage]];
        [self.view addSubview:self.basicLiveView];
        self.basicLiveView.hidden = YES;
        [self.basicLiveView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(FixChunkBad.swedishTwist.clockIntents);
            make.left.equalTo(self.anyOpaqueButton.mas_right);
            make.top.equalTo(self.view).offset(FixChunkBad.swedishTwist.reuseWithWon);
        }];
    }
    
    self.peakBadgeView = [FixChunkBad peakBadgeView];
    self.peakBadgeView.hidden = YES;
    [self.view addSubview:self.peakBadgeView];
    [self.peakBadgeView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([CatYouInfo instantCancelsSeasonFaxOffImage]) {
            make.centerY.equalTo(self.basicLiveView);
            make.left.equalTo(self.basicLiveView.mas_right).offset(FixChunkBad.swedishTwist.youngerSend);
        }else {
            make.top.equalTo(self.view).offset(FixChunkBad.swedishTwist.reuseWithWon);
            make.left.equalTo(self.anyOpaqueButton.mas_right).offset(FixChunkBad.swedishTwist.youngerSend);
        }
        make.right.equalTo(self.carIcyMaleButton.mas_left);
        make.height.mas_equalTo(FixChunkBad.swedishTwist.clockIntents);
    }];
    
    self.oneScaleLabel = [FixChunkBad portraitHyphensHormoneAnotherEligible:FixChunkBad.passLazyUnique.positionsSignalColorLibraryDecrypt];
    self.oneScaleLabel.numberOfLines = 0;
    [self.view addSubview:self.oneScaleLabel];
    [self.oneScaleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(FixChunkBad.swedishTwist.getSugarView);
        make.left.mas_equalTo(FixChunkBad.swedishTwist.herAlongHalf);
        make.right.mas_equalTo(-FixChunkBad.swedishTwist.herAlongHalf);
    }];
    
    
    self.figureUndoneTextField = [FixChunkBad floatingPolishVerticalWonTryAccount];
    self.figureUndoneTextField.enabled = NO;
    self.figureUndoneTextField.text = self.cellularKin[FixChunkBad.swedishTwist.playPenArtsName];
    [self pushInterruptOwnerEchoCycleTopView:self.figureUndoneTextField text:FixChunkBad.passLazyUnique.preventedDescentYearEraMaster];
    [self.view addSubview:self.figureUndoneTextField];
    [self.figureUndoneTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.oneScaleLabel.mas_bottom).offset(FixChunkBad.swedishTwist.beenButTeeth);
        make.left.mas_equalTo(FixChunkBad.swedishTwist.pieceSlowKin);
        make.right.mas_equalTo(-FixChunkBad.swedishTwist.pieceSlowKin);
        make.height.mas_equalTo(FixChunkBad.swedishTwist.mostIllBreak);
    }];
    
    
    self.reactorSomaliTextField = [FixChunkBad floatingPolishVerticalWonTryAccount];
    self.reactorSomaliTextField.enabled = NO;
    self.reactorSomaliTextField.text = self.cellularKin[FixChunkBad.swedishTwist.binSmallRawKey];
    [self pushInterruptOwnerEchoCycleTopView:self.reactorSomaliTextField text:FixChunkBad.passLazyUnique.frameAudibleRestartVideoBlood];
    [self.view addSubview:self.reactorSomaliTextField];
    [self.reactorSomaliTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.figureUndoneTextField.mas_bottom).offset(FixChunkBad.swedishTwist.beenButTeeth);
        make.left.right.equalTo(self.figureUndoneTextField);
        make.height.mas_equalTo(FixChunkBad.swedishTwist.mostIllBreak);
    }];
    
    
    UIButton *arteryCanButton = [FixChunkBad transportLastLightDelayPlaneColor:FixChunkBad.passLazyUnique.reminderOtherMacintoshSpeakAlert];
    [arteryCanButton addTarget:self action:@selector(additionsGigabytesFoldHandshakeConsoleAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:arteryCanButton];
    [arteryCanButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.reactorSomaliTextField.mas_bottom).offset(FixChunkBad.swedishTwist.beenButTeeth);
        make.left.right.equalTo(self.reactorSomaliTextField);
        make.height.mas_equalTo(FixChunkBad.swedishTwist.clockIntents);
    }];
    
    
    self.passWorkPenButton = [FixChunkBad filmCommitStrategySimulatesTaps:FixChunkBad.passLazyUnique.oddSiblingsButHormoneEndpointsJabber];
    [self.passWorkPenButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.passWorkPenButton addTarget:self action:@selector(provideProxyBarsMoirePivotAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.passWorkPenButton];
    [self.passWorkPenButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(arteryCanButton.mas_bottom).offset(FixChunkBad.swedishTwist.dateItemWet);
        make.centerX.equalTo(self.view);
    }];
}

- (void)pushInterruptOwnerEchoCycleTopView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(FixChunkBad.swedishTwist.clockIntents, FixChunkBad.swedishTwist.mostIllBreak)};
    UILabel *redTight = [[UILabel alloc] initWithFrame:frame];
    redTight.text = text;
    redTight.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = redTight;
}

- (void)provideProxyBarsMoirePivotAction:(UIButton *)sender {
    [[RelevanceManager shared] mutableFlagListenersResumedEstonianParseViewController:self.navigationController];
}

- (void)additionsGigabytesFoldHandshakeConsoleAction:(UIButton *)sender {
    sender.hidden = YES;
    self.oneScaleLabel.hidden = YES;
    self.peakBadgeView.hidden = NO;
    self.basicLiveView.hidden = NO;
    self.passWorkPenButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(FixChunkBad.swedishTwist.momentPurchasedMethodDueCancelingWidth, FixChunkBad.swedishTwist.chineseSeedFaxViewArtHard-FixChunkBad.swedishTwist.dryAddChrome));
    }];
    [self.figureUndoneTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.peakBadgeView.mas_bottom).offset(FixChunkBad.swedishTwist.beenButTeeth);
    }];
    [self.view layoutIfNeeded];
    
    BOOL found = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:FixChunkBad.swedishTwist.audienceModifiersAppleTypeIndexingBarrierReverse];
    if (!found) {
        self.carIcyMaleButton.hidden = NO;
        [KeyAlertView eachDismissAwakeHandoverHeadphonePink:nil message:FixChunkBad.passLazyUnique.foldLabeledAppleAnalysisYet completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= FixChunkBad.swedishTwist.negateSayHer;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:rightZipExpireGujaratiPanEntitled:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image rightZipExpireGujaratiPanEntitled:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[RelevanceManager shared] mutableFlagListenersResumedEstonianParseViewController:self.navigationController];
        [SubToast receive:FixChunkBad.passLazyUnique.milesTrySigmoidMinimalCelsius];
    }else {
        self.carIcyMaleButton.hidden = NO;
        [KeyAlertView eachDismissAwakeHandoverHeadphonePink:nil message:FixChunkBad.passLazyUnique.foldLabeledAppleAnalysisYet completion:nil];
    }
}

@end
