






#import "StyleGramWarpViewController.h"
#import "CupToast.h"
#import "PutAddInfo.h"

@interface StyleGramWarpViewController ()

@property (nonatomic, strong) UIImageView *nepaliCatView;
@property (nonatomic, strong) UIButton *actionMoireButton;
@property (nonatomic, strong) UIView *ownYellowView;
@property (nonatomic, strong) UILabel *coulombsLabel;
@property (nonatomic, strong) UITextField *forRotateLogTextField;
@property (nonatomic, strong) UITextField *realPeakDelayTextField;
@end

@implementation StyleGramWarpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.poloDecodeButton.hidden = YES;
    
    if ([PutAddInfo movementDomainSubscribeMapSecondaryImage]) {
        self.nepaliCatView = [[UIImageView alloc] initWithImage:[PutAddInfo movementDomainSubscribeMapSecondaryImage]];
        [self.view addSubview:self.nepaliCatView];
        self.nepaliCatView.hidden = YES;
        [self.nepaliCatView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(AppleNotify.emailBestRaw.pressOldBand);
            make.left.equalTo(self.partDraftButton.mas_right);
            make.top.equalTo(self.view).offset(AppleNotify.emailBestRaw.hexEffective);
        }];
    }
    
    self.ownYellowView = [AppleNotify ownYellowView];
    self.ownYellowView.hidden = YES;
    [self.view addSubview:self.ownYellowView];
    [self.ownYellowView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([PutAddInfo movementDomainSubscribeMapSecondaryImage]) {
            make.centerY.equalTo(self.nepaliCatView);
            make.left.equalTo(self.nepaliCatView.mas_right).offset(AppleNotify.emailBestRaw.yetSongView);
        }else {
            make.top.equalTo(self.view).offset(AppleNotify.emailBestRaw.hexEffective);
            make.left.equalTo(self.partDraftButton.mas_right).offset(AppleNotify.emailBestRaw.yetSongView);
        }
        make.right.equalTo(self.poloDecodeButton.mas_left);
        make.height.mas_equalTo(AppleNotify.emailBestRaw.pressOldBand);
    }];
    
    self.coulombsLabel = [AppleNotify discountsMouthBrushIncrementNineteen:AppleNotify.labelBrownCurl.gainStorylineMultipleAreaInfo];
    self.coulombsLabel.numberOfLines = 0;
    [self.view addSubview:self.coulombsLabel];
    [self.coulombsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(AppleNotify.emailBestRaw.todayCutLoop);
        make.left.mas_equalTo(AppleNotify.emailBestRaw.yahooMapMode);
        make.right.mas_equalTo(-AppleNotify.emailBestRaw.yahooMapMode);
    }];
    
    
    self.forRotateLogTextField = [AppleNotify refreshImperialItalicHowNetworkAccount];
    self.forRotateLogTextField.enabled = NO;
    self.forRotateLogTextField.text = self.problemBars[AppleNotify.emailBestRaw.teamLogTagsName];
    [self containEightConnectedHelperRecipientLogView:self.forRotateLogTextField text:AppleNotify.labelBrownCurl.mapHeadTenStableProceed];
    [self.view addSubview:self.forRotateLogTextField];
    [self.forRotateLogTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.coulombsLabel.mas_bottom).offset(AppleNotify.emailBestRaw.trademarkTip);
        make.left.mas_equalTo(AppleNotify.emailBestRaw.cutUsability);
        make.right.mas_equalTo(-AppleNotify.emailBestRaw.cutUsability);
        make.height.mas_equalTo(AppleNotify.emailBestRaw.unifyPinDate);
    }];
    
    
    self.realPeakDelayTextField = [AppleNotify refreshImperialItalicHowNetworkAccount];
    self.realPeakDelayTextField.enabled = NO;
    self.realPeakDelayTextField.text = self.problemBars[AppleNotify.emailBestRaw.notArmSpeakKey];
    [self containEightConnectedHelperRecipientLogView:self.realPeakDelayTextField text:AppleNotify.labelBrownCurl.addArmPrefersMaxReturned];
    [self.view addSubview:self.realPeakDelayTextField];
    [self.realPeakDelayTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.forRotateLogTextField.mas_bottom).offset(AppleNotify.emailBestRaw.trademarkTip);
        make.left.right.equalTo(self.forRotateLogTextField);
        make.height.mas_equalTo(AppleNotify.emailBestRaw.unifyPinDate);
    }];
    
    
    UIButton *cosmicTipButton = [AppleNotify smallerForTryDidThirdColor:AppleNotify.labelBrownCurl.climbedPubSeeDescribeStay];
    [cosmicTipButton addTarget:self action:@selector(splatSharpnessCarPubFairAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:cosmicTipButton];
    [cosmicTipButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.realPeakDelayTextField.mas_bottom).offset(AppleNotify.emailBestRaw.trademarkTip);
        make.left.right.equalTo(self.realPeakDelayTextField);
        make.height.mas_equalTo(AppleNotify.emailBestRaw.pressOldBand);
    }];
    
    
    self.actionMoireButton = [AppleNotify reservedBlobRightSamplePlacement:AppleNotify.labelBrownCurl.feetTagsAlternateCollapseFaxPair];
    [self.actionMoireButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.actionMoireButton addTarget:self action:@selector(theMetabolicPersonPendingMilesAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.actionMoireButton];
    [self.actionMoireButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(cosmicTipButton.mas_bottom).offset(AppleNotify.emailBestRaw.quotesLater);
        make.centerX.equalTo(self.view);
    }];
}

- (void)containEightConnectedHelperRecipientLogView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(AppleNotify.emailBestRaw.pressOldBand, AppleNotify.emailBestRaw.unifyPinDate)};
    UILabel *fiberDue = [[UILabel alloc] initWithFrame:frame];
    fiberDue.text = text;
    fiberDue.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = fiberDue;
}

- (void)theMetabolicPersonPendingMilesAction:(UIButton *)sender {
    [[FeedSerifManager shared] notifiesOverflowAllowablePeriodModuleDetailsViewController:self.navigationController];
}

- (void)splatSharpnessCarPubFairAction:(UIButton *)sender {
    sender.hidden = YES;
    self.coulombsLabel.hidden = YES;
    self.ownYellowView.hidden = NO;
    self.nepaliCatView.hidden = NO;
    self.actionMoireButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(AppleNotify.emailBestRaw.unionArmenianMergeVortexHelpersWidth, AppleNotify.emailBestRaw.diastolicCursiveAnchorCursiveClaimAssembly-AppleNotify.emailBestRaw.fileEqualPen));
    }];
    [self.forRotateLogTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.ownYellowView.mas_bottom).offset(AppleNotify.emailBestRaw.trademarkTip);
    }];
    [self.view layoutIfNeeded];
    
    BOOL under = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:AppleNotify.emailBestRaw.normalDecrementPatternsFormatsEllipseBasqueSlashes];
    if (!under) {
        self.poloDecodeButton.hidden = NO;
        [KinAlertView deliveredFeaturesHailGlucosePhaseFinger:nil message:AppleNotify.labelBrownCurl.delayInnerHandlesPickerUbiquity completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= AppleNotify.emailBestRaw.pinchLoudAir;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:proposalAlienQuietGainBoldFragment:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image proposalAlienQuietGainBoldFragment:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[FeedSerifManager shared] notifiesOverflowAllowablePeriodModuleDetailsViewController:self.navigationController];
        [CupToast barHang:AppleNotify.labelBrownCurl.kernelCatTwistCoachedChapter];
    }else {
        self.poloDecodeButton.hidden = NO;
        [KinAlertView deliveredFeaturesHailGlucosePhaseFinger:nil message:AppleNotify.labelBrownCurl.delayInnerHandlesPickerUbiquity completion:nil];
    }
}

@end
