






#import "MajorLogStackViewController.h"
#import "IllToast.h"
#import "ManSeeInfo.h"

@interface MajorLogStackViewController ()

@property (nonatomic, strong) UIImageView *nanogramsView;
@property (nonatomic, strong) UIButton *vitaminFourButton;
@property (nonatomic, strong) UIView *esperantoView;
@property (nonatomic, strong) UILabel *feedZoneLabel;
@property (nonatomic, strong) UITextField *beginYardAskTextField;
@property (nonatomic, strong) UITextField *pullPenTapWinTextField;
@end

@implementation MajorLogStackViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.rowProjectButton.hidden = YES;
    
    if ([ManSeeInfo trapAscenderStrongestDescentImportantImage]) {
        self.nanogramsView = [[UIImageView alloc] initWithImage:[ManSeeInfo trapAscenderStrongestDescentImportantImage]];
        [self.view addSubview:self.nanogramsView];
        self.nanogramsView.hidden = YES;
        [self.nanogramsView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(RedFlexible.capContinued.duplexCorner);
            make.left.equalTo(self.encodingsButton.mas_right);
            make.top.equalTo(self.view).offset(RedFlexible.capContinued.rowDeleteMan);
        }];
    }
    
    self.esperantoView = [RedFlexible esperantoView];
    self.esperantoView.hidden = YES;
    [self.view addSubview:self.esperantoView];
    [self.esperantoView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([ManSeeInfo trapAscenderStrongestDescentImportantImage]) {
            make.centerY.equalTo(self.nanogramsView);
            make.left.equalTo(self.nanogramsView.mas_right).offset(RedFlexible.capContinued.composeDone);
        }else {
            make.top.equalTo(self.view).offset(RedFlexible.capContinued.rowDeleteMan);
            make.left.equalTo(self.encodingsButton.mas_right).offset(RedFlexible.capContinued.composeDone);
        }
        make.right.equalTo(self.rowProjectButton.mas_left);
        make.height.mas_equalTo(RedFlexible.capContinued.duplexCorner);
    }];
    
    self.feedZoneLabel = [RedFlexible assignSlavicOpenGlobalPopover:RedFlexible.daySentFaxWill.roomSwappedTipDrizzlePub];
    self.feedZoneLabel.numberOfLines = 0;
    [self.view addSubview:self.feedZoneLabel];
    [self.feedZoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(RedFlexible.capContinued.mildOtherSin);
        make.left.mas_equalTo(RedFlexible.capContinued.alarmNetLoud);
        make.right.mas_equalTo(-RedFlexible.capContinued.alarmNetLoud);
    }];
    
    
    self.beginYardAskTextField = [RedFlexible violationTryPubGrantedWasAccount];
    self.beginYardAskTextField.enabled = NO;
    self.beginYardAskTextField.text = self.manyLeadOur[RedFlexible.capContinued.easyBadShowName];
    [self caseBadYetFixStarSupportsView:self.beginYardAskTextField text:RedFlexible.daySentFaxWill.sizeMetricMarathiPeriodThe];
    [self.view addSubview:self.beginYardAskTextField];
    [self.beginYardAskTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.feedZoneLabel.mas_bottom).offset(RedFlexible.capContinued.languageHalf);
        make.left.mas_equalTo(RedFlexible.capContinued.gallonAmpere);
        make.right.mas_equalTo(-RedFlexible.capContinued.gallonAmpere);
        make.height.mas_equalTo(RedFlexible.capContinued.busyDenseMap);
    }];
    
    
    self.pullPenTapWinTextField = [RedFlexible violationTryPubGrantedWasAccount];
    self.pullPenTapWinTextField.enabled = NO;
    self.pullPenTapWinTextField.text = self.manyLeadOur[RedFlexible.capContinued.armDitheredKey];
    [self caseBadYetFixStarSupportsView:self.pullPenTapWinTextField text:RedFlexible.daySentFaxWill.planSoccerFloorFlagMole];
    [self.view addSubview:self.pullPenTapWinTextField];
    [self.pullPenTapWinTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.beginYardAskTextField.mas_bottom).offset(RedFlexible.capContinued.languageHalf);
        make.left.right.equalTo(self.beginYardAskTextField);
        make.height.mas_equalTo(RedFlexible.capContinued.busyDenseMap);
    }];
    
    
    UIButton *thousandsButton = [RedFlexible authorNumeralPivotRecipientPluralColor:RedFlexible.daySentFaxWill.comparedDefineDocumentsStereoOrder];
    [thousandsButton addTarget:self action:@selector(dependingFunDeletingShakeObscuresAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:thousandsButton];
    [thousandsButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.pullPenTapWinTextField.mas_bottom).offset(RedFlexible.capContinued.languageHalf);
        make.left.right.equalTo(self.pullPenTapWinTextField);
        make.height.mas_equalTo(RedFlexible.capContinued.duplexCorner);
    }];
    
    
    self.vitaminFourButton = [RedFlexible supportedZoomSuggestAdvancedCat:RedFlexible.daySentFaxWill.mediaStampBufferedPortHitFilters];
    [self.vitaminFourButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.vitaminFourButton addTarget:self action:@selector(recognizeDictationDayRecursiveFrenchAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.vitaminFourButton];
    [self.vitaminFourButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(thousandsButton.mas_bottom).offset(RedFlexible.capContinued.midSuitable);
        make.centerX.equalTo(self.view);
    }];
}

- (void)caseBadYetFixStarSupportsView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(RedFlexible.capContinued.duplexCorner, RedFlexible.capContinued.busyDenseMap)};
    UILabel *welshYet = [[UILabel alloc] initWithFrame:frame];
    welshYet.text = text;
    welshYet.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = welshYet;
}

- (void)recognizeDictationDayRecursiveFrenchAction:(UIButton *)sender {
    [[PerformerManager shared] balticRadioComposedTheReturnedAdvisedViewController:self.navigationController];
}

- (void)dependingFunDeletingShakeObscuresAction:(UIButton *)sender {
    sender.hidden = YES;
    self.feedZoneLabel.hidden = YES;
    self.esperantoView.hidden = NO;
    self.nanogramsView.hidden = NO;
    self.vitaminFourButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(RedFlexible.capContinued.disappearBrowseSinhaleseUnfocusedVolumeWidth, RedFlexible.capContinued.bypassArgumentsInvertClampedIncreaseYounger-RedFlexible.capContinued.pinchExtract));
    }];
    [self.beginYardAskTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.esperantoView.mas_bottom).offset(RedFlexible.capContinued.languageHalf);
    }];
    [self.view layoutIfNeeded];
    
    BOOL blend = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:RedFlexible.capContinued.closeNoiseRecorderOverageSpeakingPassEither];
    if (!blend) {
        self.rowProjectButton.hidden = NO;
        [EndAlertView silenceMountedOverhangThousandTextureCurrency:nil message:RedFlexible.daySentFaxWill.returnSeekingInsertedPingAudiences completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= RedFlexible.capContinued.lawDiscovery;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:redoReturnNormalDiskActionsAir:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image redoReturnNormalDiskActionsAir:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[PerformerManager shared] balticRadioComposedTheReturnedAdvisedViewController:self.navigationController];
        [IllToast fatTrad:RedFlexible.daySentFaxWill.publicBrowseNativeHandlingAbort];
    }else {
        self.rowProjectButton.hidden = NO;
        [EndAlertView silenceMountedOverhangThousandTextureCurrency:nil message:RedFlexible.daySentFaxWill.returnSeekingInsertedPingAudiences completion:nil];
    }
}

@end
