






#import "RecordedAboveViewController.h"
#import "JobToast.h"
#import "SchoolInfo.h"

@interface RecordedAboveViewController ()

@property (nonatomic, strong) UIImageView *activatedView;
@property (nonatomic, strong) UIButton *nodeMealSayButton;
@property (nonatomic, strong) UIView *resultingView;
@property (nonatomic, strong) UILabel *taskWrapLabel;
@property (nonatomic, strong) UITextField *tapFriendDryTextField;
@property (nonatomic, strong) UITextField *fixTooSquaredTextField;
@end

@implementation RecordedAboveViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.golfRawSumButton.hidden = YES;
    
    if ([SchoolInfo minorSmoothingArrowInvalidEpisodeImage]) {
        self.activatedView = [[UIImageView alloc] initWithImage:[SchoolInfo minorSmoothingArrowInvalidEpisodeImage]];
        [self.view addSubview:self.activatedView];
        self.activatedView.hidden = YES;
        [self.activatedView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(RowGivenOut.mathProxyKin.rotateEarUse);
            make.left.equalTo(self.itsPickerButton.mas_right);
            make.top.equalTo(self.view).offset(RowGivenOut.mathProxyKin.climbingMode);
        }];
    }
    
    self.resultingView = [RowGivenOut resultingView];
    self.resultingView.hidden = YES;
    [self.view addSubview:self.resultingView];
    [self.resultingView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([SchoolInfo minorSmoothingArrowInvalidEpisodeImage]) {
            make.centerY.equalTo(self.activatedView);
            make.left.equalTo(self.activatedView.mas_right).offset(RowGivenOut.mathProxyKin.theSumThick);
        }else {
            make.top.equalTo(self.view).offset(RowGivenOut.mathProxyKin.climbingMode);
            make.left.equalTo(self.itsPickerButton.mas_right).offset(RowGivenOut.mathProxyKin.theSumThick);
        }
        make.right.equalTo(self.golfRawSumButton.mas_left);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.rotateEarUse);
    }];
    
    self.taskWrapLabel = [RowGivenOut sockComputerMonotonicSerbianLaw:RowGivenOut.nineHisSoloTen.contactsWasRowsIndexSamples];
    self.taskWrapLabel.numberOfLines = 0;
    [self.view addSubview:self.taskWrapLabel];
    [self.taskWrapLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(RowGivenOut.mathProxyKin.iterationBag);
        make.left.mas_equalTo(RowGivenOut.mathProxyKin.anyHalfMagic);
        make.right.mas_equalTo(-RowGivenOut.mathProxyKin.anyHalfMagic);
    }];
    
    
    self.tapFriendDryTextField = [RowGivenOut signalCanCleanSleepProfileAccount];
    self.tapFriendDryTextField.enabled = NO;
    self.tapFriendDryTextField.text = self.schoolUnify[RowGivenOut.mathProxyKin.pageAddModeName];
    [self stampTransposeCreationTapInteractDelayedView:self.tapFriendDryTextField text:RowGivenOut.nineHisSoloTen.husbandEraserEmergencyDuctilityBoth];
    [self.view addSubview:self.tapFriendDryTextField];
    [self.tapFriendDryTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.taskWrapLabel.mas_bottom).offset(RowGivenOut.mathProxyKin.eyeOneSingle);
        make.left.mas_equalTo(RowGivenOut.mathProxyKin.clipPivotAll);
        make.right.mas_equalTo(-RowGivenOut.mathProxyKin.clipPivotAll);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.spaGaspScore);
    }];
    
    
    self.fixTooSquaredTextField = [RowGivenOut signalCanCleanSleepProfileAccount];
    self.fixTooSquaredTextField.enabled = NO;
    self.fixTooSquaredTextField.text = self.schoolUnify[RowGivenOut.mathProxyKin.trashVendorKey];
    [self stampTransposeCreationTapInteractDelayedView:self.fixTooSquaredTextField text:RowGivenOut.nineHisSoloTen.beatFileSobCarExtract];
    [self.view addSubview:self.fixTooSquaredTextField];
    [self.fixTooSquaredTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tapFriendDryTextField.mas_bottom).offset(RowGivenOut.mathProxyKin.eyeOneSingle);
        make.left.right.equalTo(self.tapFriendDryTextField);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.spaGaspScore);
    }];
    
    
    UIButton *slabMountButton = [RowGivenOut moreCutoffGuestSecondRedefinedColor:RowGivenOut.nineHisSoloTen.listenersTropicalServicesTorchAppear];
    [slabMountButton addTarget:self action:@selector(dismissalArbitraryWrappersSiteWhiteAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:slabMountButton];
    [slabMountButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.fixTooSquaredTextField.mas_bottom).offset(RowGivenOut.mathProxyKin.eyeOneSingle);
        make.left.right.equalTo(self.fixTooSquaredTextField);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.rotateEarUse);
    }];
    
    
    self.nodeMealSayButton = [RowGivenOut returnPanoramasAccessoryUsesSlab:RowGivenOut.nineHisSoloTen.enclosingBrokenHerCursiveMusicalLead];
    [self.nodeMealSayButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.nodeMealSayButton addTarget:self action:@selector(intervalRowsEngravedDiscoveryRetriedAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.nodeMealSayButton];
    [self.nodeMealSayButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(slabMountButton.mas_bottom).offset(RowGivenOut.mathProxyKin.cloudGolden);
        make.centerX.equalTo(self.view);
    }];
}

- (void)stampTransposeCreationTapInteractDelayedView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(RowGivenOut.mathProxyKin.rotateEarUse, RowGivenOut.mathProxyKin.spaGaspScore)};
    UILabel *boundTag = [[UILabel alloc] initWithFrame:frame];
    boundTag.text = text;
    boundTag.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = boundTag;
}

- (void)intervalRowsEngravedDiscoveryRetriedAction:(UIButton *)sender {
    [[CapUniqueManager shared] returnUnsignedPeriodicCaffeineAdjustingWaxViewController:self.navigationController];
}

- (void)dismissalArbitraryWrappersSiteWhiteAction:(UIButton *)sender {
    sender.hidden = YES;
    self.taskWrapLabel.hidden = YES;
    self.resultingView.hidden = NO;
    self.activatedView.hidden = NO;
    self.nodeMealSayButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(RowGivenOut.mathProxyKin.pencilTopSemicolonChatterDayWidth, RowGivenOut.mathProxyKin.reactorProgramPaddleLetterManagersVirtual-RowGivenOut.mathProxyKin.delayBinDash));
    }];
    [self.tapFriendDryTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.resultingView.mas_bottom).offset(RowGivenOut.mathProxyKin.eyeOneSingle);
    }];
    [self.view layoutIfNeeded];
    
    BOOL chunk = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:RowGivenOut.mathProxyKin.solidNominallyBaseReferentHockeyThreadsOptimized];
    if (!chunk) {
        self.golfRawSumButton.hidden = NO;
        [AreAlertView internalTemporalAlignZipLayeringNatural:nil message:RowGivenOut.nineHisSoloTen.fitVerboseMessageStreamsBuild completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= RowGivenOut.mathProxyKin.moreElements;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:reservedRegionsTokenBandwidthIndicatorAdd:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image reservedRegionsTokenBandwidthIndicatorAdd:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[CapUniqueManager shared] returnUnsignedPeriodicCaffeineAdjustingWaxViewController:self.navigationController];
        [JobToast install:RowGivenOut.nineHisSoloTen.feetSleetTagsAwayComputer];
    }else {
        self.golfRawSumButton.hidden = NO;
        [AreAlertView internalTemporalAlignZipLayeringNatural:nil message:RowGivenOut.nineHisSoloTen.fitVerboseMessageStreamsBuild completion:nil];
    }
}

@end
