






#import "IdleBitSexNetViewController.h"
#import "MidToast.h"
#import "AmountInfo.h"

@interface IdleBitSexNetViewController ()

@property (nonatomic, strong) UIImageView *pullCoastView;
@property (nonatomic, strong) UIButton *eulerUnlockButton;
@property (nonatomic, strong) UIView *oneScalarView;
@property (nonatomic, strong) UILabel *documentLabel;
@property (nonatomic, strong) UITextField *decipherRateTextField;
@property (nonatomic, strong) UITextField *askAgeTalkFixTextField;
@end

@implementation IdleBitSexNetViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.crossClampButton.hidden = YES;
    
    if ([AmountInfo connectIllMarqueeStaticBondImage]) {
        self.pullCoastView = [[UIImageView alloc] initWithImage:[AmountInfo connectIllMarqueeStaticBondImage]];
        [self.view addSubview:self.pullCoastView];
        self.pullCoastView.hidden = YES;
        [self.pullCoastView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(ButPhonetic.ditheredFast.gramTableFat);
            make.left.equalTo(self.areShadowButton.mas_right);
            make.top.equalTo(self.view).offset(ButPhonetic.ditheredFast.caretFaceSpa);
        }];
    }
    
    self.oneScalarView = [ButPhonetic oneScalarView];
    self.oneScalarView.hidden = YES;
    [self.view addSubview:self.oneScalarView];
    [self.oneScalarView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([AmountInfo connectIllMarqueeStaticBondImage]) {
            make.centerY.equalTo(self.pullCoastView);
            make.left.equalTo(self.pullCoastView.mas_right).offset(ButPhonetic.ditheredFast.alarmCancel);
        }else {
            make.top.equalTo(self.view).offset(ButPhonetic.ditheredFast.caretFaceSpa);
            make.left.equalTo(self.areShadowButton.mas_right).offset(ButPhonetic.ditheredFast.alarmCancel);
        }
        make.right.equalTo(self.crossClampButton.mas_left);
        make.height.mas_equalTo(ButPhonetic.ditheredFast.gramTableFat);
    }];
    
    self.documentLabel = [ButPhonetic striationCombineDetailIdleExpanded:ButPhonetic.snowTabWhoDrum.stopThousandsThreadsExtractAffinity];
    self.documentLabel.numberOfLines = 0;
    [self.view addSubview:self.documentLabel];
    [self.documentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ButPhonetic.ditheredFast.blackNotSeek);
        make.left.mas_equalTo(ButPhonetic.ditheredFast.linerDarkHas);
        make.right.mas_equalTo(-ButPhonetic.ditheredFast.linerDarkHas);
    }];
    
    
    self.decipherRateTextField = [ButPhonetic scrollsMisplacedCustomInferGrayAccount];
    self.decipherRateTextField.enabled = NO;
    self.decipherRateTextField.text = self.tiedDecibel[ButPhonetic.ditheredFast.lineCursorsName];
    [self warnCascadeCyrillicDistortedStreamReversingView:self.decipherRateTextField text:ButPhonetic.snowTabWhoDrum.towerWorkflowSkinGramCancelled];
    [self.view addSubview:self.decipherRateTextField];
    [self.decipherRateTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.documentLabel.mas_bottom).offset(ButPhonetic.ditheredFast.barsBouncing);
        make.left.mas_equalTo(ButPhonetic.ditheredFast.lockRowChain);
        make.right.mas_equalTo(-ButPhonetic.ditheredFast.lockRowChain);
        make.height.mas_equalTo(ButPhonetic.ditheredFast.capacityHair);
    }];
    
    
    self.askAgeTalkFixTextField = [ButPhonetic scrollsMisplacedCustomInferGrayAccount];
    self.askAgeTalkFixTextField.enabled = NO;
    self.askAgeTalkFixTextField.text = self.tiedDecibel[ButPhonetic.ditheredFast.extendsEachKey];
    [self warnCascadeCyrillicDistortedStreamReversingView:self.askAgeTalkFixTextField text:ButPhonetic.snowTabWhoDrum.sayOptCircularSumPreferred];
    [self.view addSubview:self.askAgeTalkFixTextField];
    [self.askAgeTalkFixTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.decipherRateTextField.mas_bottom).offset(ButPhonetic.ditheredFast.barsBouncing);
        make.left.right.equalTo(self.decipherRateTextField);
        make.height.mas_equalTo(ButPhonetic.ditheredFast.capacityHair);
    }];
    
    
    UIButton *lookupFarButton = [ButPhonetic maximumYearsVoiceEscapePrecisionColor:ButPhonetic.snowTabWhoDrum.mediumSmallIssueGrowBasic];
    [lookupFarButton addTarget:self action:@selector(oceanRowTeaspoonsModalOptAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:lookupFarButton];
    [lookupFarButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.askAgeTalkFixTextField.mas_bottom).offset(ButPhonetic.ditheredFast.barsBouncing);
        make.left.right.equalTo(self.askAgeTalkFixTextField);
        make.height.mas_equalTo(ButPhonetic.ditheredFast.gramTableFat);
    }];
    
    
    self.eulerUnlockButton = [ButPhonetic oldestTiedLookDuplexPipe:ButPhonetic.snowTabWhoDrum.downloadsZoomScopeBoundingForceLuminance];
    [self.eulerUnlockButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.eulerUnlockButton addTarget:self action:@selector(itsPedometerCutoffSucceededPassAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.eulerUnlockButton];
    [self.eulerUnlockButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(lookupFarButton.mas_bottom).offset(ButPhonetic.ditheredFast.sixBedShift);
        make.centerX.equalTo(self.view);
    }];
}

- (void)warnCascadeCyrillicDistortedStreamReversingView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(ButPhonetic.ditheredFast.gramTableFat, ButPhonetic.ditheredFast.capacityHair)};
    UILabel *rawTotal = [[UILabel alloc] initWithFrame:frame];
    rawTotal.text = text;
    rawTotal.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = rawTotal;
}

- (void)itsPedometerCutoffSucceededPassAction:(UIButton *)sender {
    [[WasFillerManager shared] removesCroppingTableCenterExpireMarginsViewController:self.navigationController];
}

- (void)oceanRowTeaspoonsModalOptAction:(UIButton *)sender {
    sender.hidden = YES;
    self.documentLabel.hidden = YES;
    self.oneScalarView.hidden = NO;
    self.pullCoastView.hidden = NO;
    self.eulerUnlockButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(ButPhonetic.ditheredFast.oldComponentScrolledIntegerDeltaWidth, ButPhonetic.ditheredFast.serialProgramFaceInhalerAllForbid-ButPhonetic.ditheredFast.charHexIndex));
    }];
    [self.decipherRateTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.oneScalarView.mas_bottom).offset(ButPhonetic.ditheredFast.barsBouncing);
    }];
    [self.view layoutIfNeeded];
    
    BOOL quick = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:ButPhonetic.ditheredFast.remoteTriggeredGaspCheckingSonNewsstandGrow];
    if (!quick) {
        self.crossClampButton.hidden = NO;
        [EyeAlertView layoutCupSetupBuiltSurfaceRank:nil message:ButPhonetic.snowTabWhoDrum.tipListenUndoGivenSpeech completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= ButPhonetic.ditheredFast.literalEntry;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:emergencyDiscardedSystemFractionsRankPlatform:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image emergencyDiscardedSystemFractionsRankPlatform:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[WasFillerManager shared] removesCroppingTableCenterExpireMarginsViewController:self.navigationController];
        [MidToast bitName:ButPhonetic.snowTabWhoDrum.trialFinishAndInfinityPeriod];
    }else {
        self.crossClampButton.hidden = NO;
        [EyeAlertView layoutCupSetupBuiltSurfaceRank:nil message:ButPhonetic.snowTabWhoDrum.tipListenUndoGivenSpeech completion:nil];
    }
}

@end
