






#import "NetSinArmSnapViewController.h"
#import "IcyToast.h"
#import "MidDueInfo.h"

@interface NetSinArmSnapViewController ()

@property (nonatomic, strong) UIImageView *artDegreeView;
@property (nonatomic, strong) UIButton *hexRawClampButton;
@property (nonatomic, strong) UIView *nonceDustView;
@property (nonatomic, strong) UILabel *slopeSixLabel;
@property (nonatomic, strong) UITextField *attributeOutTextField;
@property (nonatomic, strong) UITextField *jabberSpacingTextField;
@end

@implementation NetSinArmSnapViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.herClampedButton.hidden = YES;
    
    if ([MidDueInfo insertWatchedPencilCharRevertingImage]) {
        self.artDegreeView = [[UIImageView alloc] initWithImage:[MidDueInfo insertWatchedPencilCharRevertingImage]];
        [self.view addSubview:self.artDegreeView];
        self.artDegreeView.hidden = YES;
        [self.artDegreeView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(MaskTheGray.andRomanPath.effectRowRow);
            make.left.equalTo(self.funnelDidButton.mas_right);
            make.top.equalTo(self.view).offset(MaskTheGray.andRomanPath.albumComplex);
        }];
    }
    
    self.nonceDustView = [MaskTheGray nonceDustView];
    self.nonceDustView.hidden = YES;
    [self.view addSubview:self.nonceDustView];
    [self.nonceDustView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([MidDueInfo insertWatchedPencilCharRevertingImage]) {
            make.centerY.equalTo(self.artDegreeView);
            make.left.equalTo(self.artDegreeView.mas_right).offset(MaskTheGray.andRomanPath.funkOverMen);
        }else {
            make.top.equalTo(self.view).offset(MaskTheGray.andRomanPath.albumComplex);
            make.left.equalTo(self.funnelDidButton.mas_right).offset(MaskTheGray.andRomanPath.funkOverMen);
        }
        make.right.equalTo(self.herClampedButton.mas_left);
        make.height.mas_equalTo(MaskTheGray.andRomanPath.effectRowRow);
    }];
    
    self.slopeSixLabel = [MaskTheGray halfFocusKilometerTopOperand:MaskTheGray.starHealthHome.sobRequestSpeedCustomMacintosh];
    self.slopeSixLabel.numberOfLines = 0;
    [self.view addSubview:self.slopeSixLabel];
    [self.slopeSixLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MaskTheGray.andRomanPath.eggSerialize);
        make.left.mas_equalTo(MaskTheGray.andRomanPath.clockwiseTab);
        make.right.mas_equalTo(-MaskTheGray.andRomanPath.clockwiseTab);
    }];
    
    
    self.attributeOutTextField = [MaskTheGray exposeCertLocalizedJumpSplitAccount];
    self.attributeOutTextField.enabled = NO;
    self.attributeOutTextField.text = self.beaconPolar[MaskTheGray.andRomanPath.endGetSlideName];
    [self vortexHybridBusyBirthViabilityMoreView:self.attributeOutTextField text:MaskTheGray.starHealthHome.wonWakeInuitHandlerOffset];
    [self.view addSubview:self.attributeOutTextField];
    [self.attributeOutTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.slopeSixLabel.mas_bottom).offset(MaskTheGray.andRomanPath.socialSubset);
        make.left.mas_equalTo(MaskTheGray.andRomanPath.desktopEmail);
        make.right.mas_equalTo(-MaskTheGray.andRomanPath.desktopEmail);
        make.height.mas_equalTo(MaskTheGray.andRomanPath.endBlurBatch);
    }];
    
    
    self.jabberSpacingTextField = [MaskTheGray exposeCertLocalizedJumpSplitAccount];
    self.jabberSpacingTextField.enabled = NO;
    self.jabberSpacingTextField.text = self.beaconPolar[MaskTheGray.andRomanPath.adoptArmBagKey];
    [self vortexHybridBusyBirthViabilityMoreView:self.jabberSpacingTextField text:MaskTheGray.starHealthHome.exposePanIndexedScrollDetects];
    [self.view addSubview:self.jabberSpacingTextField];
    [self.jabberSpacingTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.attributeOutTextField.mas_bottom).offset(MaskTheGray.andRomanPath.socialSubset);
        make.left.right.equalTo(self.attributeOutTextField);
        make.height.mas_equalTo(MaskTheGray.andRomanPath.endBlurBatch);
    }];
    
    
    UIButton *planIntroButton = [MaskTheGray commonLibraryGivenHisEitherColor:MaskTheGray.starHealthHome.inheritedPopForceMessagePassive];
    [planIntroButton addTarget:self action:@selector(illAuthorPopBoxStaticAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:planIntroButton];
    [planIntroButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.jabberSpacingTextField.mas_bottom).offset(MaskTheGray.andRomanPath.socialSubset);
        make.left.right.equalTo(self.jabberSpacingTextField);
        make.height.mas_equalTo(MaskTheGray.andRomanPath.effectRowRow);
    }];
    
    
    self.hexRawClampButton = [MaskTheGray envelopeSeventeenLiteralLaterHave:MaskTheGray.starHealthHome.specifyElementsProposedPeerFaceVisited];
    [self.hexRawClampButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.hexRawClampButton addTarget:self action:@selector(showingWinWillGetUtilitiesAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.hexRawClampButton];
    [self.hexRawClampButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(planIntroButton.mas_bottom).offset(MaskTheGray.andRomanPath.shotBrother);
        make.centerX.equalTo(self.view);
    }];
}

- (void)vortexHybridBusyBirthViabilityMoreView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(MaskTheGray.andRomanPath.effectRowRow, MaskTheGray.andRomanPath.endBlurBatch)};
    UILabel *helloCar = [[UILabel alloc] initWithFrame:frame];
    helloCar.text = text;
    helloCar.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = helloCar;
}

- (void)showingWinWillGetUtilitiesAction:(UIButton *)sender {
    [[TorchVeryManager shared] earlyMagicHalftoneRedirectSumGuestViewController:self.navigationController];
}

- (void)illAuthorPopBoxStaticAction:(UIButton *)sender {
    sender.hidden = YES;
    self.slopeSixLabel.hidden = YES;
    self.nonceDustView.hidden = NO;
    self.artDegreeView.hidden = NO;
    self.hexRawClampButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(MaskTheGray.andRomanPath.disparityMotionNetscapeLooseMajorWidth, MaskTheGray.andRomanPath.barWrappersEraHealthFriendBusy-MaskTheGray.andRomanPath.planeDefines));
    }];
    [self.attributeOutTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.nonceDustView.mas_bottom).offset(MaskTheGray.andRomanPath.socialSubset);
    }];
    [self.view layoutIfNeeded];
    
    BOOL enter = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:MaskTheGray.andRomanPath.softDidDogResolvingMutableAppearsLike];
    if (!enter) {
        self.herClampedButton.hidden = NO;
        [OldAlertView quitProceedEldestElderSubtractPong:nil message:MaskTheGray.starHealthHome.fifteenAmbiguitySpacingWetCanceled completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= MaskTheGray.andRomanPath.capsWrappers;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:googleGeometricLighterImmutableGenerateCoulombs:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image googleGeometricLighterImmutableGenerateCoulombs:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[TorchVeryManager shared] earlyMagicHalftoneRedirectSumGuestViewController:self.navigationController];
        [IcyToast takeNap:MaskTheGray.starHealthHome.heartbeatShowLexicalBloodPotential];
    }else {
        self.herClampedButton.hidden = NO;
        [OldAlertView quitProceedEldestElderSubtractPong:nil message:MaskTheGray.starHealthHome.fifteenAmbiguitySpacingWetCanceled completion:nil];
    }
}

@end
