






#import "DidRelatedYetViewController.h"
#import "EggToast.h"
#import "MethodInfo.h"

@interface DidRelatedYetViewController ()

@property (nonatomic, strong) UIImageView *occlusionView;
@property (nonatomic, strong) UIButton *whoDashGaspButton;
@property (nonatomic, strong) UIView *willGuideView;
@property (nonatomic, strong) UILabel *nowGlyphLabel;
@property (nonatomic, strong) UITextField *falloffLossyTextField;
@property (nonatomic, strong) UITextField *enablePatternTextField;
@end

@implementation DidRelatedYetViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.tooSumWakeButton.hidden = YES;
    
    if ([MethodInfo aboveHasHairAssumeTrailingImage]) {
        self.occlusionView = [[UIImageView alloc] initWithImage:[MethodInfo aboveHasHairAssumeTrailingImage]];
        [self.view addSubview:self.occlusionView];
        self.occlusionView.hidden = YES;
        [self.occlusionView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(MillLiftIll.hintLegalHue.tremorRemove);
            make.left.equalTo(self.wayHyphenButton.mas_right);
            make.top.equalTo(self.view).offset(MillLiftIll.hintLegalHue.darkenHockey);
        }];
    }
    
    self.willGuideView = [MillLiftIll willGuideView];
    self.willGuideView.hidden = YES;
    [self.view addSubview:self.willGuideView];
    [self.willGuideView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([MethodInfo aboveHasHairAssumeTrailingImage]) {
            make.centerY.equalTo(self.occlusionView);
            make.left.equalTo(self.occlusionView.mas_right).offset(MillLiftIll.hintLegalHue.fixLastPick);
        }else {
            make.top.equalTo(self.view).offset(MillLiftIll.hintLegalHue.darkenHockey);
            make.left.equalTo(self.wayHyphenButton.mas_right).offset(MillLiftIll.hintLegalHue.fixLastPick);
        }
        make.right.equalTo(self.tooSumWakeButton.mas_left);
        make.height.mas_equalTo(MillLiftIll.hintLegalHue.tremorRemove);
    }];
    
    self.nowGlyphLabel = [MillLiftIll offFloaterSenderPickKit:MillLiftIll.cutHoldDateSix.signalingSlovakOptSayDeprecate];
    self.nowGlyphLabel.numberOfLines = 0;
    [self.view addSubview:self.nowGlyphLabel];
    [self.nowGlyphLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MillLiftIll.hintLegalHue.sparseSimple);
        make.left.mas_equalTo(MillLiftIll.hintLegalHue.canExistSent);
        make.right.mas_equalTo(-MillLiftIll.hintLegalHue.canExistSent);
    }];
    
    
    self.falloffLossyTextField = [MillLiftIll telephoneFloatingDecomposeCleanPerformsAccount];
    self.falloffLossyTextField.enabled = NO;
    self.falloffLossyTextField.text = self.slashBusAsk[MillLiftIll.hintLegalHue.farTightOffName];
    [self airMalayNameRedVitalPhonogramView:self.falloffLossyTextField text:MillLiftIll.cutHoldDateSix.subscriptMindfulLongBinPassword];
    [self.view addSubview:self.falloffLossyTextField];
    [self.falloffLossyTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.nowGlyphLabel.mas_bottom).offset(MillLiftIll.hintLegalHue.encodedArrow);
        make.left.mas_equalTo(MillLiftIll.hintLegalHue.putMakerTree);
        make.right.mas_equalTo(-MillLiftIll.hintLegalHue.putMakerTree);
        make.height.mas_equalTo(MillLiftIll.hintLegalHue.bitSolidMask);
    }];
    
    
    self.enablePatternTextField = [MillLiftIll telephoneFloatingDecomposeCleanPerformsAccount];
    self.enablePatternTextField.enabled = NO;
    self.enablePatternTextField.text = self.slashBusAsk[MillLiftIll.hintLegalHue.anchorRaiseKey];
    [self airMalayNameRedVitalPhonogramView:self.enablePatternTextField text:MillLiftIll.cutHoldDateSix.menArmpitChatterCityOverlay];
    [self.view addSubview:self.enablePatternTextField];
    [self.enablePatternTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.falloffLossyTextField.mas_bottom).offset(MillLiftIll.hintLegalHue.encodedArrow);
        make.left.right.equalTo(self.falloffLossyTextField);
        make.height.mas_equalTo(MillLiftIll.hintLegalHue.bitSolidMask);
    }];
    
    
    UIButton *builtHandButton = [MillLiftIll balticUnderageGetFinishedBaselineColor:MillLiftIll.cutHoldDateSix.callbacksSlowIncludingOperationChain];
    [builtHandButton addTarget:self action:@selector(kilohertzAnimationLinerLocalizedModeAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:builtHandButton];
    [builtHandButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.enablePatternTextField.mas_bottom).offset(MillLiftIll.hintLegalHue.encodedArrow);
        make.left.right.equalTo(self.enablePatternTextField);
        make.height.mas_equalTo(MillLiftIll.hintLegalHue.tremorRemove);
    }];
    
    
    self.whoDashGaspButton = [MillLiftIll periodicCycleTicketsPerformsNotifying:MillLiftIll.cutHoldDateSix.hueLinearCardioidExclusionPreservesCreate];
    [self.whoDashGaspButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.whoDashGaspButton addTarget:self action:@selector(finishNoticeObserversSitePowerAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.whoDashGaspButton];
    [self.whoDashGaspButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(builtHandButton.mas_bottom).offset(MillLiftIll.hintLegalHue.drivenRaise);
        make.centerX.equalTo(self.view);
    }];
}

- (void)airMalayNameRedVitalPhonogramView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(MillLiftIll.hintLegalHue.tremorRemove, MillLiftIll.hintLegalHue.bitSolidMask)};
    UILabel *magicOpt = [[UILabel alloc] initWithFrame:frame];
    magicOpt.text = text;
    magicOpt.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = magicOpt;
}

- (void)finishNoticeObserversSitePowerAction:(UIButton *)sender {
    [[BitmapWaxManager shared] greekRespectsDustDrainYouBusViewController:self.navigationController];
}

- (void)kilohertzAnimationLinerLocalizedModeAction:(UIButton *)sender {
    sender.hidden = YES;
    self.nowGlyphLabel.hidden = YES;
    self.willGuideView.hidden = NO;
    self.occlusionView.hidden = NO;
    self.whoDashGaspButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(MillLiftIll.hintLegalHue.bundleFirstAllowDayDepthWidth, MillLiftIll.hintLegalHue.uplinkCallMidCreditActivatedPolicies-MillLiftIll.hintLegalHue.gatherSexual));
    }];
    [self.falloffLossyTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.willGuideView.mas_bottom).offset(MillLiftIll.hintLegalHue.encodedArrow);
    }];
    [self.view layoutIfNeeded];
    
    BOOL bayer = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:MillLiftIll.hintLegalHue.raiseProviderStylizeTintPlainSixDirty];
    if (!bayer) {
        self.tooSumWakeButton.hidden = NO;
        [NotAlertView stackSpeedDesktopNoteTheBusy:nil message:MillLiftIll.cutHoldDateSix.exerciseServicesNeverDateWrong completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= MillLiftIll.hintLegalHue.atomNickname;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:wayPanoramasAdditionUserTensionBezel:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image wayPanoramasAdditionUserTensionBezel:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[BitmapWaxManager shared] greekRespectsDustDrainYouBusViewController:self.navigationController];
        [EggToast fixLoop:MillLiftIll.cutHoldDateSix.listenersMindfulAloneArmpitSensitive];
    }else {
        self.tooSumWakeButton.hidden = NO;
        [NotAlertView stackSpeedDesktopNoteTheBusy:nil message:MillLiftIll.cutHoldDateSix.exerciseServicesNeverDateWrong completion:nil];
    }
}

@end
