






#import "SuccessHigherViewController.h"
#import "PubToast.h"
#import "BorderInfo.h"

@interface SuccessHigherViewController ()

@property (nonatomic, strong) UIImageView *logoLeastView;
@property (nonatomic, strong) UIButton *ourAscendedButton;
@property (nonatomic, strong) UIView *borderSumView;
@property (nonatomic, strong) UILabel *tooBirthLabel;
@property (nonatomic, strong) UITextField *stylizeQuoteTextField;
@property (nonatomic, strong) UITextField *farJustTagLowTextField;
@end

@implementation SuccessHigherViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.fitFunLeadButton.hidden = YES;
    
    if ([BorderInfo mildCustodianThatBrownEarlyImage]) {
        self.logoLeastView = [[UIImageView alloc] initWithImage:[BorderInfo mildCustodianThatBrownEarlyImage]];
        [self.view addSubview:self.logoLeastView];
        self.logoLeastView.hidden = YES;
        [self.logoLeastView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(MapSheFocus.ownerQuality.penWindowIts);
            make.left.equalTo(self.personTenButton.mas_right);
            make.top.equalTo(self.view).offset(MapSheFocus.ownerQuality.binContained);
        }];
    }
    
    self.borderSumView = [MapSheFocus borderSumView];
    self.borderSumView.hidden = YES;
    [self.view addSubview:self.borderSumView];
    [self.borderSumView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([BorderInfo mildCustodianThatBrownEarlyImage]) {
            make.centerY.equalTo(self.logoLeastView);
            make.left.equalTo(self.logoLeastView.mas_right).offset(MapSheFocus.ownerQuality.prepFlipWon);
        }else {
            make.top.equalTo(self.view).offset(MapSheFocus.ownerQuality.binContained);
            make.left.equalTo(self.personTenButton.mas_right).offset(MapSheFocus.ownerQuality.prepFlipWon);
        }
        make.right.equalTo(self.fitFunLeadButton.mas_left);
        make.height.mas_equalTo(MapSheFocus.ownerQuality.penWindowIts);
    }];
    
    self.tooBirthLabel = [MapSheFocus distinctObscuredFractionsGetWeekend:MapSheFocus.catBlackPopMay.cathedralBeenChamberMutationLocality];
    self.tooBirthLabel.numberOfLines = 0;
    [self.view addSubview:self.tooBirthLabel];
    [self.tooBirthLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MapSheFocus.ownerQuality.exceptionPen);
        make.left.mas_equalTo(MapSheFocus.ownerQuality.andMillibars);
        make.right.mas_equalTo(-MapSheFocus.ownerQuality.andMillibars);
    }];
    
    
    self.stylizeQuoteTextField = [MapSheFocus maxChestStrongestWrittenTorchAccount];
    self.stylizeQuoteTextField.enabled = NO;
    self.stylizeQuoteTextField.text = self.assertCross[MapSheFocus.ownerQuality.previewBurnName];
    [self reusableSuffixPreventBlobEnableStrokingView:self.stylizeQuoteTextField text:MapSheFocus.catBlackPopMay.serializeBadIdentityPreciseDelay];
    [self.view addSubview:self.stylizeQuoteTextField];
    [self.stylizeQuoteTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.tooBirthLabel.mas_bottom).offset(MapSheFocus.ownerQuality.airPulseFeed);
        make.left.mas_equalTo(MapSheFocus.ownerQuality.sinkHasAdopt);
        make.right.mas_equalTo(-MapSheFocus.ownerQuality.sinkHasAdopt);
        make.height.mas_equalTo(MapSheFocus.ownerQuality.headerPrefix);
    }];
    
    
    self.farJustTagLowTextField = [MapSheFocus maxChestStrongestWrittenTorchAccount];
    self.farJustTagLowTextField.enabled = NO;
    self.farJustTagLowTextField.text = self.assertCross[MapSheFocus.ownerQuality.allPagerBusKey];
    [self reusableSuffixPreventBlobEnableStrokingView:self.farJustTagLowTextField text:MapSheFocus.catBlackPopMay.noticeNumeratorAllocatorHailObserver];
    [self.view addSubview:self.farJustTagLowTextField];
    [self.farJustTagLowTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.stylizeQuoteTextField.mas_bottom).offset(MapSheFocus.ownerQuality.airPulseFeed);
        make.left.right.equalTo(self.stylizeQuoteTextField);
        make.height.mas_equalTo(MapSheFocus.ownerQuality.headerPrefix);
    }];
    
    
    UIButton *fileEarlyButton = [MapSheFocus zipPinchGlobalCalorieInferColor:MapSheFocus.catBlackPopMay.findHybridSourceSetupPresenter];
    [fileEarlyButton addTarget:self action:@selector(samplerDelayFireRefreshOtherAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:fileEarlyButton];
    [fileEarlyButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.farJustTagLowTextField.mas_bottom).offset(MapSheFocus.ownerQuality.airPulseFeed);
        make.left.right.equalTo(self.farJustTagLowTextField);
        make.height.mas_equalTo(MapSheFocus.ownerQuality.penWindowIts);
    }];
    
    
    self.ourAscendedButton = [MapSheFocus useSpaceStaleRawCluster:MapSheFocus.catBlackPopMay.cupZoomingSetupRetDetachingLayer];
    [self.ourAscendedButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.ourAscendedButton addTarget:self action:@selector(succeedAbortRuleGeometryThermalAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.ourAscendedButton];
    [self.ourAscendedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(fileEarlyButton.mas_bottom).offset(MapSheFocus.ownerQuality.logHerHuman);
        make.centerX.equalTo(self.view);
    }];
}

- (void)reusableSuffixPreventBlobEnableStrokingView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(MapSheFocus.ownerQuality.penWindowIts, MapSheFocus.ownerQuality.headerPrefix)};
    UILabel *penPivot = [[UILabel alloc] initWithFrame:frame];
    penPivot.text = text;
    penPivot.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = penPivot;
}

- (void)succeedAbortRuleGeometryThermalAction:(UIButton *)sender {
    [[FormThirdManager shared] secureDecideHigherPunjabiIdleValueViewController:self.navigationController];
}

- (void)samplerDelayFireRefreshOtherAction:(UIButton *)sender {
    sender.hidden = YES;
    self.tooBirthLabel.hidden = YES;
    self.borderSumView.hidden = NO;
    self.logoLeastView.hidden = NO;
    self.ourAscendedButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(MapSheFocus.ownerQuality.alienIntegralTrustRootDueWidth, MapSheFocus.ownerQuality.appearWeightedExpandingExecutingDisablePrepare-MapSheFocus.ownerQuality.frontSawFlat));
    }];
    [self.stylizeQuoteTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.borderSumView.mas_bottom).offset(MapSheFocus.ownerQuality.airPulseFeed);
    }];
    [self.view layoutIfNeeded];
    
    BOOL alive = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:MapSheFocus.ownerQuality.sobRenewTraveledProducingMacintoshPrivilegeRebus];
    if (!alive) {
        self.fitFunLeadButton.hidden = NO;
        [NowAlertView spousesPackRuleCountryImmutableSubtitles:nil message:MapSheFocus.catBlackPopMay.ensurePreferItsApplierAllowable completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= MapSheFocus.ownerQuality.usesHueFiber;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:tremorPhoneBusyModifiersUnwrapRecording:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image tremorPhoneBusyModifiersUnwrapRecording:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[FormThirdManager shared] secureDecideHigherPunjabiIdleValueViewController:self.navigationController];
        [PubToast reactor:MapSheFocus.catBlackPopMay.barrierAttachedGetReachablePong];
    }else {
        self.fitFunLeadButton.hidden = NO;
        [NowAlertView spousesPackRuleCountryImmutableSubtitles:nil message:MapSheFocus.catBlackPopMay.ensurePreferItsApplierAllowable completion:nil];
    }
}

@end
