






#import "CyclePieceFatViewController.h"
#import "WasToast.h"
#import "PinArmInfo.h"

@interface CyclePieceFatViewController ()

@property (nonatomic, strong) UIImageView *passwordsView;
@property (nonatomic, strong) UIButton *queryAcceptButton;
@property (nonatomic, strong) UIView *hallMovieView;
@property (nonatomic, strong) UILabel *echoHailLabel;
@property (nonatomic, strong) UITextField *tenPulseModeTextField;
@property (nonatomic, strong) UITextField *badPubFlatTapTextField;
@end

@implementation CyclePieceFatViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.busExtractButton.hidden = YES;
    
    if ([PinArmInfo goalSpecificDaughterAbortInstallImage]) {
        self.passwordsView = [[UIImageView alloc] initWithImage:[PinArmInfo goalSpecificDaughterAbortInstallImage]];
        [self.view addSubview:self.passwordsView];
        self.passwordsView.hidden = YES;
        [self.passwordsView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(SubBondFour.nodeFourteen.greekAverage);
            make.left.equalTo(self.forkChestButton.mas_right);
            make.top.equalTo(self.view).offset(SubBondFour.nodeFourteen.potassiumTop);
        }];
    }
    
    self.hallMovieView = [SubBondFour hallMovieView];
    self.hallMovieView.hidden = YES;
    [self.view addSubview:self.hallMovieView];
    [self.hallMovieView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([PinArmInfo goalSpecificDaughterAbortInstallImage]) {
            make.centerY.equalTo(self.passwordsView);
            make.left.equalTo(self.passwordsView.mas_right).offset(SubBondFour.nodeFourteen.tagWetTorch);
        }else {
            make.top.equalTo(self.view).offset(SubBondFour.nodeFourteen.potassiumTop);
            make.left.equalTo(self.forkChestButton.mas_right).offset(SubBondFour.nodeFourteen.tagWetTorch);
        }
        make.right.equalTo(self.busExtractButton.mas_left);
        make.height.mas_equalTo(SubBondFour.nodeFourteen.greekAverage);
    }];
    
    self.echoHailLabel = [SubBondFour wetBaseLevelConfirmOptimize:SubBondFour.injectionBlack.longerTransportAloneBedEgg];
    self.echoHailLabel.numberOfLines = 0;
    [self.view addSubview:self.echoHailLabel];
    [self.echoHailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(SubBondFour.nodeFourteen.designSomali);
        make.left.mas_equalTo(SubBondFour.nodeFourteen.masteringLaw);
        make.right.mas_equalTo(-SubBondFour.nodeFourteen.masteringLaw);
    }];
    
    
    self.tenPulseModeTextField = [SubBondFour gracefulActionAudioDroppedWordAccount];
    self.tenPulseModeTextField.enabled = NO;
    self.tenPulseModeTextField.text = self.panoramaEra[SubBondFour.nodeFourteen.detachTableName];
    [self bedDependentTalkNeutralTopWebpageView:self.tenPulseModeTextField text:SubBondFour.injectionBlack.pluralCoachedWinMagicConfigure];
    [self.view addSubview:self.tenPulseModeTextField];
    [self.tenPulseModeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.echoHailLabel.mas_bottom).offset(SubBondFour.nodeFourteen.dogStackWait);
        make.left.mas_equalTo(SubBondFour.nodeFourteen.mustKashmiri);
        make.right.mas_equalTo(-SubBondFour.nodeFourteen.mustKashmiri);
        make.height.mas_equalTo(SubBondFour.nodeFourteen.extendingPop);
    }];
    
    
    self.badPubFlatTapTextField = [SubBondFour gracefulActionAudioDroppedWordAccount];
    self.badPubFlatTapTextField.enabled = NO;
    self.badPubFlatTapTextField.text = self.panoramaEra[SubBondFour.nodeFourteen.runUnitMoleKey];
    [self bedDependentTalkNeutralTopWebpageView:self.badPubFlatTapTextField text:SubBondFour.injectionBlack.newsstandChatterFileYardAlphabet];
    [self.view addSubview:self.badPubFlatTapTextField];
    [self.badPubFlatTapTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tenPulseModeTextField.mas_bottom).offset(SubBondFour.nodeFourteen.dogStackWait);
        make.left.right.equalTo(self.tenPulseModeTextField);
        make.height.mas_equalTo(SubBondFour.nodeFourteen.extendingPop);
    }];
    
    
    UIButton *warpPasteButton = [SubBondFour certDateSlovakDisablingTalkColor:SubBondFour.injectionBlack.orderedDanishLinkDoneTension];
    [warpPasteButton addTarget:self action:@selector(signatureRejectionStrokedBagMusicAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:warpPasteButton];
    [warpPasteButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.badPubFlatTapTextField.mas_bottom).offset(SubBondFour.nodeFourteen.dogStackWait);
        make.left.right.equalTo(self.badPubFlatTapTextField);
        make.height.mas_equalTo(SubBondFour.nodeFourteen.greekAverage);
    }];
    
    
    self.queryAcceptButton = [SubBondFour acrossProcessesHindiDepthTower:SubBondFour.injectionBlack.occlusionUserParseDistinctBondKin];
    [self.queryAcceptButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.queryAcceptButton addTarget:self action:@selector(engineerContentMakeSixCoastAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.queryAcceptButton];
    [self.queryAcceptButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(warpPasteButton.mas_bottom).offset(SubBondFour.nodeFourteen.moduleTamil);
        make.centerX.equalTo(self.view);
    }];
}

- (void)bedDependentTalkNeutralTopWebpageView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(SubBondFour.nodeFourteen.greekAverage, SubBondFour.nodeFourteen.extendingPop)};
    UILabel *sentinel = [[UILabel alloc] initWithFrame:frame];
    sentinel.text = text;
    sentinel.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = sentinel;
}

- (void)engineerContentMakeSixCoastAction:(UIButton *)sender {
    [[KeysVoiceManager shared] eventualKeyComputerPluralUsabilityFilmViewController:self.navigationController];
}

- (void)signatureRejectionStrokedBagMusicAction:(UIButton *)sender {
    sender.hidden = YES;
    self.echoHailLabel.hidden = YES;
    self.hallMovieView.hidden = NO;
    self.passwordsView.hidden = NO;
    self.queryAcceptButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(SubBondFour.nodeFourteen.skippedOrderingCapDiacriticCaptureWidth, SubBondFour.nodeFourteen.returningRevertRelayReversedOutThreads-SubBondFour.nodeFourteen.chainLastSob));
    }];
    [self.tenPulseModeTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.hallMovieView.mas_bottom).offset(SubBondFour.nodeFourteen.dogStackWait);
    }];
    [self.view layoutIfNeeded];
    
    BOOL cycle = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:SubBondFour.nodeFourteen.endpointsTotalProvidingReceiveProminentPrimariesUnbounded];
    if (!cycle) {
        self.busExtractButton.hidden = NO;
        [HerAlertView peakKilohertzRepeatsModerateCaretIntent:nil message:SubBondFour.injectionBlack.bigCautionCloudFreeDropped completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= SubBondFour.nodeFourteen.sixNanograms;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:spaceNearCloudyRhythmExportedFatal:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image spaceNearCloudyRhythmExportedFatal:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[KeysVoiceManager shared] eventualKeyComputerPluralUsabilityFilmViewController:self.navigationController];
        [WasToast pickAnd:SubBondFour.injectionBlack.proxiesCyclePubStriationSound];
    }else {
        self.busExtractButton.hidden = NO;
        [HerAlertView peakKilohertzRepeatsModerateCaretIntent:nil message:SubBondFour.injectionBlack.bigCautionCloudFreeDropped completion:nil];
    }
}

@end
