






#import "BlueWillSevenViewController.h"
#import "WaxToast.h"
#import "ArtAirInfo.h"

@interface BlueWillSevenViewController ()

@property (nonatomic, strong) UIImageView *echoRadioView;
@property (nonatomic, strong) UIButton *lineLowCharButton;
@property (nonatomic, strong) UIView *stereoArtView;
@property (nonatomic, strong) UILabel *retDraftLabel;
@property (nonatomic, strong) UITextField *tagStripPathTextField;
@property (nonatomic, strong) UITextField *dryNumbersWayTextField;
@end

@implementation BlueWillSevenViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.workOuncesButton.hidden = YES;
    
    if ([ArtAirInfo parallelCauseThreeButUnderImage]) {
        self.echoRadioView = [[UIImageView alloc] initWithImage:[ArtAirInfo parallelCauseThreeButUnderImage]];
        [self.view addSubview:self.echoRadioView];
        self.echoRadioView.hidden = YES;
        [self.echoRadioView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(HerLaunched.brownFairKin.bypassedPool);
            make.left.equalTo(self.agePreferButton.mas_right);
            make.top.equalTo(self.view).offset(HerLaunched.brownFairKin.illStringAny);
        }];
    }
    
    self.stereoArtView = [HerLaunched stereoArtView];
    self.stereoArtView.hidden = YES;
    [self.view addSubview:self.stereoArtView];
    [self.stereoArtView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([ArtAirInfo parallelCauseThreeButUnderImage]) {
            make.centerY.equalTo(self.echoRadioView);
            make.left.equalTo(self.echoRadioView.mas_right).offset(HerLaunched.brownFairKin.scanAskCurl);
        }else {
            make.top.equalTo(self.view).offset(HerLaunched.brownFairKin.illStringAny);
            make.left.equalTo(self.agePreferButton.mas_right).offset(HerLaunched.brownFairKin.scanAskCurl);
        }
        make.right.equalTo(self.workOuncesButton.mas_left);
        make.height.mas_equalTo(HerLaunched.brownFairKin.bypassedPool);
    }];
    
    self.retDraftLabel = [HerLaunched sleepOceanMayConsumedThousands:HerLaunched.pinCarOuterMan.favoritesPrettyCubeArtBoundary];
    self.retDraftLabel.numberOfLines = 0;
    [self.view addSubview:self.retDraftLabel];
    [self.retDraftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(HerLaunched.brownFairKin.farthestPick);
        make.left.mas_equalTo(HerLaunched.brownFairKin.pathPopHuman);
        make.right.mas_equalTo(-HerLaunched.brownFairKin.pathPopHuman);
    }];
    
    
    self.tagStripPathTextField = [HerLaunched restoredSumRequestedLengthsCircleAccount];
    self.tagStripPathTextField.enabled = NO;
    self.tagStripPathTextField.text = self.artworkBand[HerLaunched.brownFairKin.faxDirtyBarName];
    [self balticVisualCarChallengeEffectPointerView:self.tagStripPathTextField text:HerLaunched.pinCarOuterMan.reasonTargetedClickAttitudeLaunch];
    [self.view addSubview:self.tagStripPathTextField];
    [self.tagStripPathTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.retDraftLabel.mas_bottom).offset(HerLaunched.brownFairKin.intentArtBit);
        make.left.mas_equalTo(HerLaunched.brownFairKin.brushFadeIts);
        make.right.mas_equalTo(-HerLaunched.brownFairKin.brushFadeIts);
        make.height.mas_equalTo(HerLaunched.brownFairKin.halfAccurate);
    }];
    
    
    self.dryNumbersWayTextField = [HerLaunched restoredSumRequestedLengthsCircleAccount];
    self.dryNumbersWayTextField.enabled = NO;
    self.dryNumbersWayTextField.text = self.artworkBand[HerLaunched.brownFairKin.maxUsesMoreKey];
    [self balticVisualCarChallengeEffectPointerView:self.dryNumbersWayTextField text:HerLaunched.pinCarOuterMan.nowBagMainHeartbeatAsleep];
    [self.view addSubview:self.dryNumbersWayTextField];
    [self.dryNumbersWayTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tagStripPathTextField.mas_bottom).offset(HerLaunched.brownFairKin.intentArtBit);
        make.left.right.equalTo(self.tagStripPathTextField);
        make.height.mas_equalTo(HerLaunched.brownFairKin.halfAccurate);
    }];
    
    
    UIButton *exactnessButton = [HerLaunched sortSaySpeakersOrnamentsKitColor:HerLaunched.pinCarOuterMan.mixerStarPopGenericTrigger];
    [exactnessButton addTarget:self action:@selector(sumFilteredEnsureSixDitherAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:exactnessButton];
    [exactnessButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.dryNumbersWayTextField.mas_bottom).offset(HerLaunched.brownFairKin.intentArtBit);
        make.left.right.equalTo(self.dryNumbersWayTextField);
        make.height.mas_equalTo(HerLaunched.brownFairKin.bypassedPool);
    }];
    
    
    self.lineLowCharButton = [HerLaunched commandsMapCupSaltEast:HerLaunched.pinCarOuterMan.elasticRareBroadcastChineseRunMeal];
    [self.lineLowCharButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.lineLowCharButton addTarget:self action:@selector(subFinnishTwistHaveErrorAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.lineLowCharButton];
    [self.lineLowCharButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(exactnessButton.mas_bottom).offset(HerLaunched.brownFairKin.widthHasGet);
        make.centerX.equalTo(self.view);
    }];
}

- (void)balticVisualCarChallengeEffectPointerView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(HerLaunched.brownFairKin.bypassedPool, HerLaunched.brownFairKin.halfAccurate)};
    UILabel *optInter = [[UILabel alloc] initWithFrame:frame];
    optInter.text = text;
    optInter.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = optInter;
}

- (void)subFinnishTwistHaveErrorAction:(UIButton *)sender {
    [[NiacinBigManager shared] taskEventFunWaistLookNowViewController:self.navigationController];
}

- (void)sumFilteredEnsureSixDitherAction:(UIButton *)sender {
    sender.hidden = YES;
    self.retDraftLabel.hidden = YES;
    self.stereoArtView.hidden = NO;
    self.echoRadioView.hidden = NO;
    self.lineLowCharButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(HerLaunched.brownFairKin.notifiedPopOwnBlobRetriedWidth, HerLaunched.brownFairKin.boldSignalResolvedWillDisorderTriangle-HerLaunched.brownFairKin.afterYardFat));
    }];
    [self.tagStripPathTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.stereoArtView.mas_bottom).offset(HerLaunched.brownFairKin.intentArtBit);
    }];
    [self.view layoutIfNeeded];
    
    BOOL roman = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:HerLaunched.brownFairKin.thiaminBannerSpectralCreationSocketPlaybackTwo];
    if (!roman) {
        self.workOuncesButton.hidden = NO;
        [WasAlertView socialLocallyPowerInterruptCapReal:nil message:HerLaunched.pinCarOuterMan.workoutsLocalesAnimationSequencerClick completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= HerLaunched.brownFairKin.fetchedAlpha;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:sliceOtherSuchGeneralRestoringReuse:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image sliceOtherSuchGeneralRestoringReuse:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[NiacinBigManager shared] taskEventFunWaistLookNowViewController:self.navigationController];
        [WaxToast noneOdd:HerLaunched.pinCarOuterMan.performedEarFeatTrapEye];
    }else {
        self.workOuncesButton.hidden = NO;
        [WasAlertView socialLocallyPowerInterruptCapReal:nil message:HerLaunched.pinCarOuterMan.workoutsLocalesAnimationSequencerClick completion:nil];
    }
}

@end
