






#import "ZipEditHowDidViewController.h"
#import "KitToast.h"
#import "MinderInfo.h"

@interface ZipEditHowDidViewController ()

@property (nonatomic, strong) UIImageView *masterNetView;
@property (nonatomic, strong) UIButton *torchMomentButton;
@property (nonatomic, strong) UIView *flatClangView;
@property (nonatomic, strong) UILabel *activityLabel;
@property (nonatomic, strong) UITextField *qualifiedEggTextField;
@property (nonatomic, strong) UITextField *waistOptAlbumTextField;
@end

@implementation ZipEditHowDidViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.acrossStopButton.hidden = YES;
    
    if ([MinderInfo bookAndCapLeaveSubjectImage]) {
        self.masterNetView = [[UIImageView alloc] initWithImage:[MinderInfo bookAndCapLeaveSubjectImage]];
        [self.view addSubview:self.masterNetView];
        self.masterNetView.hidden = YES;
        [self.masterNetView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(OutTapPlain.parentMixMay.tooTabMetric);
            make.left.equalTo(self.earStrideButton.mas_right);
            make.top.equalTo(self.view).offset(OutTapPlain.parentMixMay.gaussianOver);
        }];
    }
    
    self.flatClangView = [OutTapPlain flatClangView];
    self.flatClangView.hidden = YES;
    [self.view addSubview:self.flatClangView];
    [self.flatClangView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([MinderInfo bookAndCapLeaveSubjectImage]) {
            make.centerY.equalTo(self.masterNetView);
            make.left.equalTo(self.masterNetView.mas_right).offset(OutTapPlain.parentMixMay.boundIndian);
        }else {
            make.top.equalTo(self.view).offset(OutTapPlain.parentMixMay.gaussianOver);
            make.left.equalTo(self.earStrideButton.mas_right).offset(OutTapPlain.parentMixMay.boundIndian);
        }
        make.right.equalTo(self.acrossStopButton.mas_left);
        make.height.mas_equalTo(OutTapPlain.parentMixMay.tooTabMetric);
    }];
    
    self.activityLabel = [OutTapPlain chromePanFloatingDisorderFold:OutTapPlain.loudMeterMount.molarOrdinaryPaperPlayableBed];
    self.activityLabel.numberOfLines = 0;
    [self.view addSubview:self.activityLabel];
    [self.activityLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(OutTapPlain.parentMixMay.iconRenaming);
        make.left.mas_equalTo(OutTapPlain.parentMixMay.sandboxTamil);
        make.right.mas_equalTo(-OutTapPlain.parentMixMay.sandboxTamil);
    }];
    
    
    self.qualifiedEggTextField = [OutTapPlain hintQuickColleagueOperationBridgeAccount];
    self.qualifiedEggTextField.enabled = NO;
    self.qualifiedEggTextField.text = self.runServices[OutTapPlain.parentMixMay.assertLegalName];
    [self deepIterateSuchNegotiateClaimPrintView:self.qualifiedEggTextField text:OutTapPlain.loudMeterMount.overlayJobBendSnowIdentical];
    [self.view addSubview:self.qualifiedEggTextField];
    [self.qualifiedEggTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.activityLabel.mas_bottom).offset(OutTapPlain.parentMixMay.hasWasHigher);
        make.left.mas_equalTo(OutTapPlain.parentMixMay.takeWhiteArm);
        make.right.mas_equalTo(-OutTapPlain.parentMixMay.takeWhiteArm);
        make.height.mas_equalTo(OutTapPlain.parentMixMay.thirteenHigh);
    }];
    
    
    self.waistOptAlbumTextField = [OutTapPlain hintQuickColleagueOperationBridgeAccount];
    self.waistOptAlbumTextField.enabled = NO;
    self.waistOptAlbumTextField.text = self.runServices[OutTapPlain.parentMixMay.didCaretItsKey];
    [self deepIterateSuchNegotiateClaimPrintView:self.waistOptAlbumTextField text:OutTapPlain.loudMeterMount.allowPatientAcuteRareRebuild];
    [self.view addSubview:self.waistOptAlbumTextField];
    [self.waistOptAlbumTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.qualifiedEggTextField.mas_bottom).offset(OutTapPlain.parentMixMay.hasWasHigher);
        make.left.right.equalTo(self.qualifiedEggTextField);
        make.height.mas_equalTo(OutTapPlain.parentMixMay.thirteenHigh);
    }];
    
    
    UIButton *kilovoltsButton = [OutTapPlain busIndoorTableDrizzleAwayColor:OutTapPlain.loudMeterMount.declinedAirTakeLockFolder];
    [kilovoltsButton addTarget:self action:@selector(hurricaneLowNormalizeStrictBlockAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:kilovoltsButton];
    [kilovoltsButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.waistOptAlbumTextField.mas_bottom).offset(OutTapPlain.parentMixMay.hasWasHigher);
        make.left.right.equalTo(self.waistOptAlbumTextField);
        make.height.mas_equalTo(OutTapPlain.parentMixMay.tooTabMetric);
    }];
    
    
    self.torchMomentButton = [OutTapPlain familyPhysicalEllipsisExtraBreak:OutTapPlain.loudMeterMount.allMartialTaskBinLooseHumidity];
    [self.torchMomentButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.torchMomentButton addTarget:self action:@selector(cubicMediumRegionAutoGlobalAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.torchMomentButton];
    [self.torchMomentButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(kilovoltsButton.mas_bottom).offset(OutTapPlain.parentMixMay.kitChromium);
        make.centerX.equalTo(self.view);
    }];
}

- (void)deepIterateSuchNegotiateClaimPrintView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(OutTapPlain.parentMixMay.tooTabMetric, OutTapPlain.parentMixMay.thirteenHigh)};
    UILabel *tomorrow = [[UILabel alloc] initWithFrame:frame];
    tomorrow.text = text;
    tomorrow.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = tomorrow;
}

- (void)cubicMediumRegionAutoGlobalAction:(UIButton *)sender {
    [[AwayGlyphManager shared] kazakhReceiverCoverageBandwidthPeakConstantViewController:self.navigationController];
}

- (void)hurricaneLowNormalizeStrictBlockAction:(UIButton *)sender {
    sender.hidden = YES;
    self.activityLabel.hidden = YES;
    self.flatClangView.hidden = NO;
    self.masterNetView.hidden = NO;
    self.torchMomentButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(OutTapPlain.parentMixMay.spotlightKelvinCapturingAskTopWidth, OutTapPlain.parentMixMay.afterBadDocumentsHeightItsRectified-OutTapPlain.parentMixMay.transformFit));
    }];
    [self.qualifiedEggTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.flatClangView.mas_bottom).offset(OutTapPlain.parentMixMay.hasWasHigher);
    }];
    [self.view layoutIfNeeded];
    
    BOOL trait = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:OutTapPlain.parentMixMay.airAmpereTryBusBalticBendCreator];
    if (!trait) {
        self.acrossStopButton.hidden = NO;
        [SixAlertView eventPutJapaneseMoodEraAlarm:nil message:OutTapPlain.loudMeterMount.digestCircularMapArrowSee completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= OutTapPlain.parentMixMay.strictButTry;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:specifiedStoreFinishingDaysCardWeighted:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image specifiedStoreFinishingDaysCardWeighted:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[AwayGlyphManager shared] kazakhReceiverCoverageBandwidthPeakConstantViewController:self.navigationController];
        [KitToast nowLoud:OutTapPlain.loudMeterMount.workWhoPointerKilowattSomali];
    }else {
        self.acrossStopButton.hidden = NO;
        [SixAlertView eventPutJapaneseMoodEraAlarm:nil message:OutTapPlain.loudMeterMount.digestCircularMapArrowSee completion:nil];
    }
}

@end
