






#import "NapReturnsNapViewController.h"
#import "LawToast.h"
#import "AppearInfo.h"

@interface NapReturnsNapViewController ()

@property (nonatomic, strong) UIImageView *lovePivotView;
@property (nonatomic, strong) UIButton *itsPanQuietButton;
@property (nonatomic, strong) UIView *busChargeView;
@property (nonatomic, strong) UILabel *eligibleLabel;
@property (nonatomic, strong) UITextField *wayEverySentTextField;
@property (nonatomic, strong) UITextField *nameFatYouKitTextField;
@end

@implementation NapReturnsNapViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.sawLaotianButton.hidden = YES;
    
    if ([AppearInfo beginningHertzResizePhraseDisablesImage]) {
        self.lovePivotView = [[UIImageView alloc] initWithImage:[AppearInfo beginningHertzResizePhraseDisablesImage]];
        [self.view addSubview:self.lovePivotView];
        self.lovePivotView.hidden = YES;
        [self.lovePivotView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(ReloadThird.overlapQuote.keyFlipVideo);
            make.left.equalTo(self.realEvictButton.mas_right);
            make.top.equalTo(self.view).offset(ReloadThird.overlapQuote.smallestChat);
        }];
    }
    
    self.busChargeView = [ReloadThird busChargeView];
    self.busChargeView.hidden = YES;
    [self.view addSubview:self.busChargeView];
    [self.busChargeView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([AppearInfo beginningHertzResizePhraseDisablesImage]) {
            make.centerY.equalTo(self.lovePivotView);
            make.left.equalTo(self.lovePivotView.mas_right).offset(ReloadThird.overlapQuote.vortexStair);
        }else {
            make.top.equalTo(self.view).offset(ReloadThird.overlapQuote.smallestChat);
            make.left.equalTo(self.realEvictButton.mas_right).offset(ReloadThird.overlapQuote.vortexStair);
        }
        make.right.equalTo(self.sawLaotianButton.mas_left);
        make.height.mas_equalTo(ReloadThird.overlapQuote.keyFlipVideo);
    }];
    
    self.eligibleLabel = [ReloadThird youUniqueDriveLatencySharing:ReloadThird.phoneKitTenTen.wrappedOnlyOuncesDashThreads];
    self.eligibleLabel.numberOfLines = 0;
    [self.view addSubview:self.eligibleLabel];
    [self.eligibleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ReloadThird.overlapQuote.particleIron);
        make.left.mas_equalTo(ReloadThird.overlapQuote.nowRemembers);
        make.right.mas_equalTo(-ReloadThird.overlapQuote.nowRemembers);
    }];
    
    
    self.wayEverySentTextField = [ReloadThird compressBondStarOwnerBlockerAccount];
    self.wayEverySentTextField.enabled = NO;
    self.wayEverySentTextField.text = self.jobBagStrip[ReloadThird.overlapQuote.sessionPeerName];
    [self rateSymbolsFlipRemoteHumidityNeverView:self.wayEverySentTextField text:ReloadThird.phoneKitTenTen.portionCertHowMixCaution];
    [self.view addSubview:self.wayEverySentTextField];
    [self.wayEverySentTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.eligibleLabel.mas_bottom).offset(ReloadThird.overlapQuote.flipWhoChina);
        make.left.mas_equalTo(ReloadThird.overlapQuote.linkageSetup);
        make.right.mas_equalTo(-ReloadThird.overlapQuote.linkageSetup);
        make.height.mas_equalTo(ReloadThird.overlapQuote.napPreparing);
    }];
    
    
    self.nameFatYouKitTextField = [ReloadThird compressBondStarOwnerBlockerAccount];
    self.nameFatYouKitTextField.enabled = NO;
    self.nameFatYouKitTextField.text = self.jobBagStrip[ReloadThird.overlapQuote.assetDeleteKey];
    [self rateSymbolsFlipRemoteHumidityNeverView:self.nameFatYouKitTextField text:ReloadThird.phoneKitTenTen.greenUpsidePasteTextureWord];
    [self.view addSubview:self.nameFatYouKitTextField];
    [self.nameFatYouKitTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.wayEverySentTextField.mas_bottom).offset(ReloadThird.overlapQuote.flipWhoChina);
        make.left.right.equalTo(self.wayEverySentTextField);
        make.height.mas_equalTo(ReloadThird.overlapQuote.napPreparing);
    }];
    
    
    UIButton *directNetButton = [ReloadThird signerClampingSeventeenForbiddenAmharicColor:ReloadThird.phoneKitTenTen.segmentStillOwnEggTemplate];
    [directNetButton addTarget:self action:@selector(eastRainFlushRejectSexAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:directNetButton];
    [directNetButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.nameFatYouKitTextField.mas_bottom).offset(ReloadThird.overlapQuote.flipWhoChina);
        make.left.right.equalTo(self.nameFatYouKitTextField);
        make.height.mas_equalTo(ReloadThird.overlapQuote.keyFlipVideo);
    }];
    
    
    self.itsPanQuietButton = [ReloadThird portionSequenceLandmarkFixOffer:ReloadThird.phoneKitTenTen.pictureFirstForceMixerLanguagesProtocols];
    [self.itsPanQuietButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.itsPanQuietButton addTarget:self action:@selector(borderedLooseOutSmileSucceedAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.itsPanQuietButton];
    [self.itsPanQuietButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(directNetButton.mas_bottom).offset(ReloadThird.overlapQuote.ropeClicked);
        make.centerX.equalTo(self.view);
    }];
}

- (void)rateSymbolsFlipRemoteHumidityNeverView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(ReloadThird.overlapQuote.keyFlipVideo, ReloadThird.overlapQuote.napPreparing)};
    UILabel *photoSum = [[UILabel alloc] initWithFrame:frame];
    photoSum.text = text;
    photoSum.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = photoSum;
}

- (void)borderedLooseOutSmileSucceedAction:(UIButton *)sender {
    [[ManualCupManager shared] softGlucoseObservingBagDolbySuchViewController:self.navigationController];
}

- (void)eastRainFlushRejectSexAction:(UIButton *)sender {
    sender.hidden = YES;
    self.eligibleLabel.hidden = YES;
    self.busChargeView.hidden = NO;
    self.lovePivotView.hidden = NO;
    self.itsPanQuietButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(ReloadThird.overlapQuote.focusPipeUndoGallonPlayableWidth, ReloadThird.overlapQuote.ciphersFrictionExcludePetiteCanExtension-ReloadThird.overlapQuote.drivenEndLog));
    }];
    [self.wayEverySentTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.busChargeView.mas_bottom).offset(ReloadThird.overlapQuote.flipWhoChina);
    }];
    [self.view layoutIfNeeded];
    
    BOOL birth = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:ReloadThird.overlapQuote.organizePhaseMainFeatureBoundingReturnedWon];
    if (!birth) {
        self.sawLaotianButton.hidden = NO;
        [WasAlertView styleAppendingDueSurgePascalReady:nil message:ReloadThird.phoneKitTenTen.strokeLookSecondNiacinTags completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= ReloadThird.overlapQuote.twistPostLaw;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:workoutSilencedSpaceFinalKeyDecoder:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image workoutSilencedSpaceFinalKeyDecoder:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[ManualCupManager shared] softGlucoseObservingBagDolbySuchViewController:self.navigationController];
        [LawToast tooUnit:ReloadThird.phoneKitTenTen.coloredCoercionTruncatesTelephoneCycle];
    }else {
        self.sawLaotianButton.hidden = NO;
        [WasAlertView styleAppendingDueSurgePascalReady:nil message:ReloadThird.phoneKitTenTen.strokeLookSecondNiacinTags completion:nil];
    }
}

@end
