






#import "PointFocusDayViewController.h"
#import "MapToast.h"
#import "FourthInfo.h"

@interface PointFocusDayViewController ()

@property (nonatomic, strong) UIImageView *bendEmailView;
@property (nonatomic, strong) UIButton *getTooSenseButton;
@property (nonatomic, strong) UIView *mouseIdleView;
@property (nonatomic, strong) UILabel *moodSkinLabel;
@property (nonatomic, strong) UITextField *bendHowInsetTextField;
@property (nonatomic, strong) UITextField *tipGenericWetTextField;
@end

@implementation PointFocusDayViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.feetHowAndButton.hidden = YES;
    
    if ([FourthInfo infinityDestroySearchBookHungarianImage]) {
        self.bendEmailView = [[UIImageView alloc] initWithImage:[FourthInfo infinityDestroySearchBookHungarianImage]];
        [self.view addSubview:self.bendEmailView];
        self.bendEmailView.hidden = YES;
        [self.bendEmailView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(ZipCoulombs.locatorCanon.orderTagsOff);
            make.left.equalTo(self.notIndianButton.mas_right);
            make.top.equalTo(self.view).offset(ZipCoulombs.locatorCanon.bedEqualLess);
        }];
    }
    
    self.mouseIdleView = [ZipCoulombs mouseIdleView];
    self.mouseIdleView.hidden = YES;
    [self.view addSubview:self.mouseIdleView];
    [self.mouseIdleView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([FourthInfo infinityDestroySearchBookHungarianImage]) {
            make.centerY.equalTo(self.bendEmailView);
            make.left.equalTo(self.bendEmailView.mas_right).offset(ZipCoulombs.locatorCanon.sigmoidDeny);
        }else {
            make.top.equalTo(self.view).offset(ZipCoulombs.locatorCanon.bedEqualLess);
            make.left.equalTo(self.notIndianButton.mas_right).offset(ZipCoulombs.locatorCanon.sigmoidDeny);
        }
        make.right.equalTo(self.feetHowAndButton.mas_left);
        make.height.mas_equalTo(ZipCoulombs.locatorCanon.orderTagsOff);
    }];
    
    self.moodSkinLabel = [ZipCoulombs barriersDrumLeakyLimitReveal:ZipCoulombs.airAgeGreekAnd.movieBiotinLegacyShrinkBrown];
    self.moodSkinLabel.numberOfLines = 0;
    [self.view addSubview:self.moodSkinLabel];
    [self.moodSkinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ZipCoulombs.locatorCanon.rearIncludes);
        make.left.mas_equalTo(ZipCoulombs.locatorCanon.yetPathLocal);
        make.right.mas_equalTo(-ZipCoulombs.locatorCanon.yetPathLocal);
    }];
    
    
    self.bendHowInsetTextField = [ZipCoulombs subDependentPartLengthExposeAccount];
    self.bendHowInsetTextField.enabled = NO;
    self.bendHowInsetTextField.text = self.sinFrontIll[ZipCoulombs.locatorCanon.areaTapCallName];
    [self canCleanBagUtilitySimulatesEvaluateView:self.bendHowInsetTextField text:ZipCoulombs.airAgeGreekAnd.burmeseInstantAnyAnswerHierarchy];
    [self.view addSubview:self.bendHowInsetTextField];
    [self.bendHowInsetTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.moodSkinLabel.mas_bottom).offset(ZipCoulombs.locatorCanon.encodeDidSun);
        make.left.mas_equalTo(ZipCoulombs.locatorCanon.playWireless);
        make.right.mas_equalTo(-ZipCoulombs.locatorCanon.playWireless);
        make.height.mas_equalTo(ZipCoulombs.locatorCanon.illTeluguTag);
    }];
    
    
    self.tipGenericWetTextField = [ZipCoulombs subDependentPartLengthExposeAccount];
    self.tipGenericWetTextField.enabled = NO;
    self.tipGenericWetTextField.text = self.sinFrontIll[ZipCoulombs.locatorCanon.filtersSlabKey];
    [self canCleanBagUtilitySimulatesEvaluateView:self.tipGenericWetTextField text:ZipCoulombs.airAgeGreekAnd.spaLargeOffTitleLift];
    [self.view addSubview:self.tipGenericWetTextField];
    [self.tipGenericWetTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.bendHowInsetTextField.mas_bottom).offset(ZipCoulombs.locatorCanon.encodeDidSun);
        make.left.right.equalTo(self.bendHowInsetTextField);
        make.height.mas_equalTo(ZipCoulombs.locatorCanon.illTeluguTag);
    }];
    
    
    UIButton *waxNoticeButton = [ZipCoulombs bayerEyeLoopDecideRelevanceColor:ZipCoulombs.airAgeGreekAnd.attachedTransientThumbEndpointPrime];
    [waxNoticeButton addTarget:self action:@selector(peakRouteRealmDispensePerformedAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:waxNoticeButton];
    [waxNoticeButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tipGenericWetTextField.mas_bottom).offset(ZipCoulombs.locatorCanon.encodeDidSun);
        make.left.right.equalTo(self.tipGenericWetTextField);
        make.height.mas_equalTo(ZipCoulombs.locatorCanon.orderTagsOff);
    }];
    
    
    self.getTooSenseButton = [ZipCoulombs strictlyCyclingPackTimeDutch:ZipCoulombs.airAgeGreekAnd.chunkAndTryCommandBeaconBuilder];
    [self.getTooSenseButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.getTooSenseButton addTarget:self action:@selector(successMayRelationsDiscreteOperandAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.getTooSenseButton];
    [self.getTooSenseButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(waxNoticeButton.mas_bottom).offset(ZipCoulombs.locatorCanon.photoCreamy);
        make.centerX.equalTo(self.view);
    }];
}

- (void)canCleanBagUtilitySimulatesEvaluateView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(ZipCoulombs.locatorCanon.orderTagsOff, ZipCoulombs.locatorCanon.illTeluguTag)};
    UILabel *funOuter = [[UILabel alloc] initWithFrame:frame];
    funOuter.text = text;
    funOuter.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = funOuter;
}

- (void)successMayRelationsDiscreteOperandAction:(UIButton *)sender {
    [[UndefinedManager shared] buddhistLeapSnapshotChineseSecurelySmoothedViewController:self.navigationController];
}

- (void)peakRouteRealmDispensePerformedAction:(UIButton *)sender {
    sender.hidden = YES;
    self.moodSkinLabel.hidden = YES;
    self.mouseIdleView.hidden = NO;
    self.bendEmailView.hidden = NO;
    self.getTooSenseButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(ZipCoulombs.locatorCanon.bleedSlashesImmediateLogTelephotoWidth, ZipCoulombs.locatorCanon.aspectStandSafetyPriorSundaneseBevel-ZipCoulombs.locatorCanon.producesUsed));
    }];
    [self.bendHowInsetTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.mouseIdleView.mas_bottom).offset(ZipCoulombs.locatorCanon.encodeDidSun);
    }];
    [self.view layoutIfNeeded];
    
    BOOL modal = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:ZipCoulombs.locatorCanon.irishEndThatIslamicAboveStampCommitted];
    if (!modal) {
        self.feetHowAndButton.hidden = NO;
        [BadAlertView resultingClaimRareAtomPashtoReview:nil message:ZipCoulombs.airAgeGreekAnd.rankBitsCollectorVarianceAuthority completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= ZipCoulombs.locatorCanon.proceedLimit;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:manPlugDescribesOffDistortedHow:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image manPlugDescribesOffDistortedHow:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[UndefinedManager shared] buddhistLeapSnapshotChineseSecurelySmoothedViewController:self.navigationController];
        [MapToast roomCat:ZipCoulombs.airAgeGreekAnd.alienHallPreparingNeverManaged];
    }else {
        self.feetHowAndButton.hidden = NO;
        [BadAlertView resultingClaimRareAtomPashtoReview:nil message:ZipCoulombs.airAgeGreekAnd.rankBitsCollectorVarianceAuthority completion:nil];
    }
}

@end
