






#import "NapSinArtsMidViewController.h"
#import "WasToast.h"
#import "DrivenInfo.h"

@interface NapSinArtsMidViewController ()

@property (nonatomic, strong) UIImageView *onlySolidView;
@property (nonatomic, strong) UIButton *tipLargeSunButton;
@property (nonatomic, strong) UIView *errorLockView;
@property (nonatomic, strong) UILabel *lowerTheLabel;
@property (nonatomic, strong) UITextField *alienRefusedTextField;
@property (nonatomic, strong) UITextField *decigramsHandTextField;
@end

@implementation NapSinArtsMidViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.sawPageWonButton.hidden = YES;
    
    if ([DrivenInfo deprecateSinhaleseCaptionRemembersCatalanImage]) {
        self.onlySolidView = [[UIImageView alloc] initWithImage:[DrivenInfo deprecateSinhaleseCaptionRemembersCatalanImage]];
        [self.view addSubview:self.onlySolidView];
        self.onlySolidView.hidden = YES;
        [self.onlySolidView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(BurstPetite.virtualSheet.enclosingToo);
            make.left.equalTo(self.sheLittleButton.mas_right);
            make.top.equalTo(self.view).offset(BurstPetite.virtualSheet.canTerabytes);
        }];
    }
    
    self.errorLockView = [BurstPetite errorLockView];
    self.errorLockView.hidden = YES;
    [self.view addSubview:self.errorLockView];
    [self.errorLockView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([DrivenInfo deprecateSinhaleseCaptionRemembersCatalanImage]) {
            make.centerY.equalTo(self.onlySolidView);
            make.left.equalTo(self.onlySolidView.mas_right).offset(BurstPetite.virtualSheet.partGeneral);
        }else {
            make.top.equalTo(self.view).offset(BurstPetite.virtualSheet.canTerabytes);
            make.left.equalTo(self.sheLittleButton.mas_right).offset(BurstPetite.virtualSheet.partGeneral);
        }
        make.right.equalTo(self.sawPageWonButton.mas_left);
        make.height.mas_equalTo(BurstPetite.virtualSheet.enclosingToo);
    }];
    
    self.lowerTheLabel = [BurstPetite computerMetricStepsonHumidityBoldface:BurstPetite.setupScheduled.biometryTaggerAscentFoundKeyboard];
    self.lowerTheLabel.numberOfLines = 0;
    [self.view addSubview:self.lowerTheLabel];
    [self.lowerTheLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BurstPetite.virtualSheet.wetSixVisual);
        make.left.mas_equalTo(BurstPetite.virtualSheet.croppingMute);
        make.right.mas_equalTo(-BurstPetite.virtualSheet.croppingMute);
    }];
    
    
    self.alienRefusedTextField = [BurstPetite legibleHardClippingIncrementHeartbeatAccount];
    self.alienRefusedTextField.enabled = NO;
    self.alienRefusedTextField.text = self.forTiedRows[BurstPetite.virtualSheet.bedIllMoireName];
    [self reverseLineDirectionCubeInstancesDogView:self.alienRefusedTextField text:BurstPetite.setupScheduled.transferHourSleetActivatedIntersect];
    [self.view addSubview:self.alienRefusedTextField];
    [self.alienRefusedTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.lowerTheLabel.mas_bottom).offset(BurstPetite.virtualSheet.takeMovieBad);
        make.left.mas_equalTo(BurstPetite.virtualSheet.onceStripMay);
        make.right.mas_equalTo(-BurstPetite.virtualSheet.onceStripMay);
        make.height.mas_equalTo(BurstPetite.virtualSheet.nineCreation);
    }];
    
    
    self.decigramsHandTextField = [BurstPetite legibleHardClippingIncrementHeartbeatAccount];
    self.decigramsHandTextField.enabled = NO;
    self.decigramsHandTextField.text = self.forTiedRows[BurstPetite.virtualSheet.workAdvisedKey];
    [self reverseLineDirectionCubeInstancesDogView:self.decigramsHandTextField text:BurstPetite.setupScheduled.insertingUnifyFirmwareStackedFood];
    [self.view addSubview:self.decigramsHandTextField];
    [self.decigramsHandTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.alienRefusedTextField.mas_bottom).offset(BurstPetite.virtualSheet.takeMovieBad);
        make.left.right.equalTo(self.alienRefusedTextField);
        make.height.mas_equalTo(BurstPetite.virtualSheet.nineCreation);
    }];
    
    
    UIButton *armIntentButton = [BurstPetite paragraphPicturePositionHisSumColor:BurstPetite.setupScheduled.magnitudeFourthTexturedCropStroking];
    [armIntentButton addTarget:self action:@selector(printablePanoramasFinalOutletPushAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:armIntentButton];
    [armIntentButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.decigramsHandTextField.mas_bottom).offset(BurstPetite.virtualSheet.takeMovieBad);
        make.left.right.equalTo(self.decigramsHandTextField);
        make.height.mas_equalTo(BurstPetite.virtualSheet.enclosingToo);
    }];
    
    
    self.tipLargeSunButton = [BurstPetite anyFragmentsReturningSatisfiedDecision:BurstPetite.setupScheduled.pushSwashesLogHardMaxDescender];
    [self.tipLargeSunButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.tipLargeSunButton addTarget:self action:@selector(adjustNeedRowSubProvisionAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.tipLargeSunButton];
    [self.tipLargeSunButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(armIntentButton.mas_bottom).offset(BurstPetite.virtualSheet.inputDigest);
        make.centerX.equalTo(self.view);
    }];
}

- (void)reverseLineDirectionCubeInstancesDogView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(BurstPetite.virtualSheet.enclosingToo, BurstPetite.virtualSheet.nineCreation)};
    UILabel *retrieve = [[UILabel alloc] initWithFrame:frame];
    retrieve.text = text;
    retrieve.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = retrieve;
}

- (void)adjustNeedRowSubProvisionAction:(UIButton *)sender {
    [[DeleteWhoManager shared] totalSayForceRecordDanishObstacleViewController:self.navigationController];
}

- (void)printablePanoramasFinalOutletPushAction:(UIButton *)sender {
    sender.hidden = YES;
    self.lowerTheLabel.hidden = YES;
    self.errorLockView.hidden = NO;
    self.onlySolidView.hidden = NO;
    self.tipLargeSunButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(BurstPetite.virtualSheet.areEraScriptsRoomParserWidth, BurstPetite.virtualSheet.coalesceCutLacrosseLacrosseParagraphPortrait-BurstPetite.virtualSheet.teluguPencil));
    }];
    [self.alienRefusedTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.errorLockView.mas_bottom).offset(BurstPetite.virtualSheet.takeMovieBad);
    }];
    [self.view layoutIfNeeded];
    
    BOOL drive = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:BurstPetite.virtualSheet.preserveAmericanCampaignMakeInviteeHitGrow];
    if (!drive) {
        self.sawPageWonButton.hidden = NO;
        [CarAlertView irregularCounterBarrierHoldHelperEgg:nil message:BurstPetite.setupScheduled.partnerOriginBezelSlavicInhaler completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= BurstPetite.virtualSheet.chatPriorRaw;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:visionThreadZipCancelledAnimationProtocols:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image visionThreadZipCancelledAnimationProtocols:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[DeleteWhoManager shared] totalSayForceRecordDanishObstacleViewController:self.navigationController];
        [WasToast manySin:BurstPetite.setupScheduled.pronounSexLaotianTelephonyFont];
    }else {
        self.sawPageWonButton.hidden = NO;
        [CarAlertView irregularCounterBarrierHoldHelperEgg:nil message:BurstPetite.setupScheduled.partnerOriginBezelSlavicInhaler completion:nil];
    }
}

@end
