






#import "EyeBadAverageViewController.h"
#import "MidToast.h"
#import "RouterInfo.h"

@interface EyeBadAverageViewController ()

@property (nonatomic, strong) UIImageView *mixerHighView;
@property (nonatomic, strong) UIButton *molarHueArmButton;
@property (nonatomic, strong) UIView *hurricaneView;
@property (nonatomic, strong) UILabel *imageOutLabel;
@property (nonatomic, strong) UITextField *thinSawPivotTextField;
@property (nonatomic, strong) UITextField *dayAddJobForkTextField;
@end

@implementation EyeBadAverageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.tabTreeBagButton.hidden = YES;
    
    if ([RouterInfo jobIndexAffinePreparingEraImage]) {
        self.mixerHighView = [[UIImageView alloc] initWithImage:[RouterInfo jobIndexAffinePreparingEraImage]];
        [self.view addSubview:self.mixerHighView];
        self.mixerHighView.hidden = YES;
        [self.mixerHighView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(UserArtRoot.wayAbortLove.textBuddySee);
            make.left.equalTo(self.winSampleButton.mas_right);
            make.top.equalTo(self.view).offset(UserArtRoot.wayAbortLove.panGreenSpan);
        }];
    }
    
    self.hurricaneView = [UserArtRoot hurricaneView];
    self.hurricaneView.hidden = YES;
    [self.view addSubview:self.hurricaneView];
    [self.hurricaneView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([RouterInfo jobIndexAffinePreparingEraImage]) {
            make.centerY.equalTo(self.mixerHighView);
            make.left.equalTo(self.mixerHighView.mas_right).offset(UserArtRoot.wayAbortLove.hueSpineKit);
        }else {
            make.top.equalTo(self.view).offset(UserArtRoot.wayAbortLove.panGreenSpan);
            make.left.equalTo(self.winSampleButton.mas_right).offset(UserArtRoot.wayAbortLove.hueSpineKit);
        }
        make.right.equalTo(self.tabTreeBagButton.mas_left);
        make.height.mas_equalTo(UserArtRoot.wayAbortLove.textBuddySee);
    }];
    
    self.imageOutLabel = [UserArtRoot readyChromiumHardTakeRemote:UserArtRoot.builtOwnSeeEar.pullCustomCollectedAsteriskMore];
    self.imageOutLabel.numberOfLines = 0;
    [self.view addSubview:self.imageOutLabel];
    [self.imageOutLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(UserArtRoot.wayAbortLove.sobHitNiacin);
        make.left.mas_equalTo(UserArtRoot.wayAbortLove.satisfiedWon);
        make.right.mas_equalTo(-UserArtRoot.wayAbortLove.satisfiedWon);
    }];
    
    
    self.thinSawPivotTextField = [UserArtRoot seedDescribeNeutralWasOffAccount];
    self.thinSawPivotTextField.enabled = NO;
    self.thinSawPivotTextField.text = self.dublinChest[UserArtRoot.wayAbortLove.sourcesUsedName];
    [self unorderedSwipeExceedsFunnelCarTagView:self.thinSawPivotTextField text:UserArtRoot.builtOwnSeeEar.deliverMagnitudeQualityRepliesForm];
    [self.view addSubview:self.thinSawPivotTextField];
    [self.thinSawPivotTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.imageOutLabel.mas_bottom).offset(UserArtRoot.wayAbortLove.localeAnchor);
        make.left.mas_equalTo(UserArtRoot.wayAbortLove.deltaRefused);
        make.right.mas_equalTo(-UserArtRoot.wayAbortLove.deltaRefused);
        make.height.mas_equalTo(UserArtRoot.wayAbortLove.bitsDesigner);
    }];
    
    
    self.dayAddJobForkTextField = [UserArtRoot seedDescribeNeutralWasOffAccount];
    self.dayAddJobForkTextField.enabled = NO;
    self.dayAddJobForkTextField.text = self.dublinChest[UserArtRoot.wayAbortLove.encryptTagsKey];
    [self unorderedSwipeExceedsFunnelCarTagView:self.dayAddJobForkTextField text:UserArtRoot.builtOwnSeeEar.internalGaelicPassiveBrushScrolled];
    [self.view addSubview:self.dayAddJobForkTextField];
    [self.dayAddJobForkTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.thinSawPivotTextField.mas_bottom).offset(UserArtRoot.wayAbortLove.localeAnchor);
        make.left.right.equalTo(self.thinSawPivotTextField);
        make.height.mas_equalTo(UserArtRoot.wayAbortLove.bitsDesigner);
    }];
    
    
    UIButton *pubSpeechButton = [UserArtRoot arrayAuditedDirectorRedoneLongestColor:UserArtRoot.builtOwnSeeEar.toggleEntriesSequencerMayCommon];
    [pubSpeechButton addTarget:self action:@selector(dayExpandedOuncesDeviceResponderAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:pubSpeechButton];
    [pubSpeechButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.dayAddJobForkTextField.mas_bottom).offset(UserArtRoot.wayAbortLove.localeAnchor);
        make.left.right.equalTo(self.dayAddJobForkTextField);
        make.height.mas_equalTo(UserArtRoot.wayAbortLove.textBuddySee);
    }];
    
    
    self.molarHueArmButton = [UserArtRoot touchTremorAppearingFullCity:UserArtRoot.builtOwnSeeEar.streamsGivenLacrosseMapTemporalParser];
    [self.molarHueArmButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.molarHueArmButton addTarget:self action:@selector(occurTapFailureSayRestoreAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.molarHueArmButton];
    [self.molarHueArmButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(pubSpeechButton.mas_bottom).offset(UserArtRoot.wayAbortLove.searchError);
        make.centerX.equalTo(self.view);
    }];
}

- (void)unorderedSwipeExceedsFunnelCarTagView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(UserArtRoot.wayAbortLove.textBuddySee, UserArtRoot.wayAbortLove.bitsDesigner)};
    UILabel *stayPage = [[UILabel alloc] initWithFrame:frame];
    stayPage.text = text;
    stayPage.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = stayPage;
}

- (void)occurTapFailureSayRestoreAction:(UIButton *)sender {
    [[MatchMenuManager shared] oldDirtyCountTenGlyphBaseballViewController:self.navigationController];
}

- (void)dayExpandedOuncesDeviceResponderAction:(UIButton *)sender {
    sender.hidden = YES;
    self.imageOutLabel.hidden = YES;
    self.hurricaneView.hidden = NO;
    self.mixerHighView.hidden = NO;
    self.molarHueArmButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(UserArtRoot.wayAbortLove.toneLineSidebarComposedIndentWidth, UserArtRoot.wayAbortLove.sinUnwindOwnerExecutingPlateAmharic-UserArtRoot.wayAbortLove.twoBulgarian));
    }];
    [self.thinSawPivotTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.hurricaneView.mas_bottom).offset(UserArtRoot.wayAbortLove.localeAnchor);
    }];
    [self.view layoutIfNeeded];
    
    BOOL patch = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:UserArtRoot.wayAbortLove.pointerKindDetectedRearrangeOldCollationAsk];
    if (!patch) {
        self.tabTreeBagButton.hidden = NO;
        [KinAlertView solidFixMaxCookieFloorBecome:nil message:UserArtRoot.builtOwnSeeEar.largerSindhiNegotiateDeliveredRequested completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= UserArtRoot.wayAbortLove.bitOffsetPan;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:musicianProxySplitPhysicalOuterScheduled:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image musicianProxySplitPhysicalOuterScheduled:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[MatchMenuManager shared] oldDirtyCountTenGlyphBaseballViewController:self.navigationController];
        [MidToast adjusts:UserArtRoot.builtOwnSeeEar.winCacheSubscribeHurricaneElder];
    }else {
        self.tabTreeBagButton.hidden = NO;
        [KinAlertView solidFixMaxCookieFloorBecome:nil message:UserArtRoot.builtOwnSeeEar.largerSindhiNegotiateDeliveredRequested completion:nil];
    }
}

@end
