






#import "EntryIntervalViewController.h"
#import "KeyToast.h"
#import "MiddleInfo.h"

@interface EntryIntervalViewController ()

@property (nonatomic, strong) UIImageView *absentItsView;
@property (nonatomic, strong) UIButton *freezingHexButton;
@property (nonatomic, strong) UIView *rhythmLowView;
@property (nonatomic, strong) UILabel *leakyPopLabel;
@property (nonatomic, strong) UITextField *iterativeSobTextField;
@property (nonatomic, strong) UITextField *oddHangAddYouTextField;
@end

@implementation EntryIntervalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.libraryFarButton.hidden = YES;
    
    if ([MiddleInfo beenDecisionLambdaGlobalAdjustedImage]) {
        self.absentItsView = [[UIImageView alloc] initWithImage:[MiddleInfo beenDecisionLambdaGlobalAdjustedImage]];
        [self.view addSubview:self.absentItsView];
        self.absentItsView.hidden = YES;
        [self.absentItsView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(ClaimMaxBig.applierPatch.cloudPutSign);
            make.left.equalTo(self.clearLoveButton.mas_right);
            make.top.equalTo(self.view).offset(ClaimMaxBig.applierPatch.turnHeadline);
        }];
    }
    
    self.rhythmLowView = [ClaimMaxBig rhythmLowView];
    self.rhythmLowView.hidden = YES;
    [self.view addSubview:self.rhythmLowView];
    [self.rhythmLowView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([MiddleInfo beenDecisionLambdaGlobalAdjustedImage]) {
            make.centerY.equalTo(self.absentItsView);
            make.left.equalTo(self.absentItsView.mas_right).offset(ClaimMaxBig.applierPatch.providesKey);
        }else {
            make.top.equalTo(self.view).offset(ClaimMaxBig.applierPatch.turnHeadline);
            make.left.equalTo(self.clearLoveButton.mas_right).offset(ClaimMaxBig.applierPatch.providesKey);
        }
        make.right.equalTo(self.libraryFarButton.mas_left);
        make.height.mas_equalTo(ClaimMaxBig.applierPatch.cloudPutSign);
    }];
    
    self.leakyPopLabel = [ClaimMaxBig joinFlushBlusterySpotlightSuspended:ClaimMaxBig.allFeedEarGolf.bendFollowScalePintUsed];
    self.leakyPopLabel.numberOfLines = 0;
    [self.view addSubview:self.leakyPopLabel];
    [self.leakyPopLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ClaimMaxBig.applierPatch.runRedoneDog);
        make.left.mas_equalTo(ClaimMaxBig.applierPatch.wonSourceSay);
        make.right.mas_equalTo(-ClaimMaxBig.applierPatch.wonSourceSay);
    }];
    
    
    self.iterativeSobTextField = [ClaimMaxBig closeCancelledDogCutInlandAccount];
    self.iterativeSobTextField.enabled = NO;
    self.iterativeSobTextField.text = self.upscaleDays[ClaimMaxBig.applierPatch.nativeGradeName];
    [self drawHoldDropHockeySiteWorkspaceView:self.iterativeSobTextField text:ClaimMaxBig.allFeedEarGolf.armSourcesAskResourceMetal];
    [self.view addSubview:self.iterativeSobTextField];
    [self.iterativeSobTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.leakyPopLabel.mas_bottom).offset(ClaimMaxBig.applierPatch.tipValueFree);
        make.left.mas_equalTo(ClaimMaxBig.applierPatch.plugRunClaim);
        make.right.mas_equalTo(-ClaimMaxBig.applierPatch.plugRunClaim);
        make.height.mas_equalTo(ClaimMaxBig.applierPatch.immediateYou);
    }];
    
    
    self.oddHangAddYouTextField = [ClaimMaxBig closeCancelledDogCutInlandAccount];
    self.oddHangAddYouTextField.enabled = NO;
    self.oddHangAddYouTextField.text = self.upscaleDays[ClaimMaxBig.applierPatch.absentBasalKey];
    [self drawHoldDropHockeySiteWorkspaceView:self.oddHangAddYouTextField text:ClaimMaxBig.allFeedEarGolf.cellphoneExtrinsicWarnHumanBin];
    [self.view addSubview:self.oddHangAddYouTextField];
    [self.oddHangAddYouTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.iterativeSobTextField.mas_bottom).offset(ClaimMaxBig.applierPatch.tipValueFree);
        make.left.right.equalTo(self.iterativeSobTextField);
        make.height.mas_equalTo(ClaimMaxBig.applierPatch.immediateYou);
    }];
    
    
    UIButton *teluguEyeButton = [ClaimMaxBig reportingOptionalNonceEquallyBreakingColor:ClaimMaxBig.allFeedEarGolf.streamedIllInuitExtrinsicYellow];
    [teluguEyeButton addTarget:self action:@selector(apertureProcessesHyphensTapProductAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:teluguEyeButton];
    [teluguEyeButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.oddHangAddYouTextField.mas_bottom).offset(ClaimMaxBig.applierPatch.tipValueFree);
        make.left.right.equalTo(self.oddHangAddYouTextField);
        make.height.mas_equalTo(ClaimMaxBig.applierPatch.cloudPutSign);
    }];
    
    
    self.freezingHexButton = [ClaimMaxBig buttonBridgingTalkQuietBand:ClaimMaxBig.allFeedEarGolf.sunAdvanceDecimalSobPenCache];
    [self.freezingHexButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.freezingHexButton addTarget:self action:@selector(kilobytesExtractOffAddSheAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.freezingHexButton];
    [self.freezingHexButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(teluguEyeButton.mas_bottom).offset(ClaimMaxBig.applierPatch.bezelSpoken);
        make.centerX.equalTo(self.view);
    }];
}

- (void)drawHoldDropHockeySiteWorkspaceView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(ClaimMaxBig.applierPatch.cloudPutSign, ClaimMaxBig.applierPatch.immediateYou)};
    UILabel *nonceMay = [[UILabel alloc] initWithFrame:frame];
    nonceMay.text = text;
    nonceMay.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = nonceMay;
}

- (void)kilobytesExtractOffAddSheAction:(UIButton *)sender {
    [[ZoneAngleManager shared] remotelyAskPeakOrganizeSortWonViewController:self.navigationController];
}

- (void)apertureProcessesHyphensTapProductAction:(UIButton *)sender {
    sender.hidden = YES;
    self.leakyPopLabel.hidden = YES;
    self.rhythmLowView.hidden = NO;
    self.absentItsView.hidden = NO;
    self.freezingHexButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(ClaimMaxBig.applierPatch.sunSegueBusyScrollBalancedWidth, ClaimMaxBig.applierPatch.categoryIncrementExceedsCookieBigAssign-ClaimMaxBig.applierPatch.detectsCross));
    }];
    [self.iterativeSobTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.rhythmLowView.mas_bottom).offset(ClaimMaxBig.applierPatch.tipValueFree);
    }];
    [self.view layoutIfNeeded];
    
    BOOL extra = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:ClaimMaxBig.applierPatch.segmentsInsertAdvisoryProtectedPreviewDidUses];
    if (!extra) {
        self.libraryFarButton.hidden = NO;
        [TwoAlertView oldDomainsDesignerSeeThreeAccurate:nil message:ClaimMaxBig.allFeedEarGolf.editInterSmoothedSixLenient completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= ClaimMaxBig.applierPatch.loadDaughter;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:performedFactoryViewCostClipStrong:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image performedFactoryViewCostClipStrong:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[ZoneAngleManager shared] remotelyAskPeakOrganizeSortWonViewController:self.navigationController];
        [KeyToast manyTop:ClaimMaxBig.allFeedEarGolf.creditRootMethodStepsonPunjabi];
    }else {
        self.libraryFarButton.hidden = NO;
        [TwoAlertView oldDomainsDesignerSeeThreeAccurate:nil message:ClaimMaxBig.allFeedEarGolf.editInterSmoothedSixLenient completion:nil];
    }
}

@end
