






#import "BlobSnowSpeedViewController.h"
#import "AnyToast.h"
#import "DegreeInfo.h"

@interface BlobSnowSpeedViewController ()

@property (nonatomic, strong) UIImageView *preferredView;
@property (nonatomic, strong) UIButton *burnStayOneButton;
@property (nonatomic, strong) UIView *polarDrumView;
@property (nonatomic, strong) UILabel *servicesLabel;
@property (nonatomic, strong) UITextField *carFaxRenameTextField;
@property (nonatomic, strong) UITextField *coverCloudPutTextField;
@end

@implementation BlobSnowSpeedViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.halfWayPopButton.hidden = YES;
    
    if ([DegreeInfo fingerBusyColorScriptsOvulationImage]) {
        self.preferredView = [[UIImageView alloc] initWithImage:[DegreeInfo fingerBusyColorScriptsOvulationImage]];
        [self.view addSubview:self.preferredView];
        self.preferredView.hidden = YES;
        [self.preferredView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(ZipRestThat.heartHowLead.proceedMolar);
            make.left.equalTo(self.itsReaderButton.mas_right);
            make.top.equalTo(self.view).offset(ZipRestThat.heartHowLead.brandMasters);
        }];
    }
    
    self.polarDrumView = [ZipRestThat polarDrumView];
    self.polarDrumView.hidden = YES;
    [self.view addSubview:self.polarDrumView];
    [self.polarDrumView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([DegreeInfo fingerBusyColorScriptsOvulationImage]) {
            make.centerY.equalTo(self.preferredView);
            make.left.equalTo(self.preferredView.mas_right).offset(ZipRestThat.heartHowLead.optBurstLaw);
        }else {
            make.top.equalTo(self.view).offset(ZipRestThat.heartHowLead.brandMasters);
            make.left.equalTo(self.itsReaderButton.mas_right).offset(ZipRestThat.heartHowLead.optBurstLaw);
        }
        make.right.equalTo(self.halfWayPopButton.mas_left);
        make.height.mas_equalTo(ZipRestThat.heartHowLead.proceedMolar);
    }];
    
    self.servicesLabel = [ZipRestThat howHitWhoUploadingSuch:ZipRestThat.useCatAliveLow.downloadCapacityUnifySchemePlace];
    self.servicesLabel.numberOfLines = 0;
    [self.view addSubview:self.servicesLabel];
    [self.servicesLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ZipRestThat.heartHowLead.attributeFax);
        make.left.mas_equalTo(ZipRestThat.heartHowLead.twoAdjustOwn);
        make.right.mas_equalTo(-ZipRestThat.heartHowLead.twoAdjustOwn);
    }];
    
    
    self.carFaxRenameTextField = [ZipRestThat exceptionSynthesisNeutralWonIndexAccount];
    self.carFaxRenameTextField.enabled = NO;
    self.carFaxRenameTextField.text = self.groupedSink[ZipRestThat.heartHowLead.saveSixWorkName];
    [self accordingImmediatePreventPingTatarWayView:self.carFaxRenameTextField text:ZipRestThat.useCatAliveLow.versionsSlideGuestCollisionOdd];
    [self.view addSubview:self.carFaxRenameTextField];
    [self.carFaxRenameTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.servicesLabel.mas_bottom).offset(ZipRestThat.heartHowLead.zeroChecksum);
        make.left.mas_equalTo(ZipRestThat.heartHowLead.dirtyButMute);
        make.right.mas_equalTo(-ZipRestThat.heartHowLead.dirtyButMute);
        make.height.mas_equalTo(ZipRestThat.heartHowLead.tabMatrixYet);
    }];
    
    
    self.coverCloudPutTextField = [ZipRestThat exceptionSynthesisNeutralWonIndexAccount];
    self.coverCloudPutTextField.enabled = NO;
    self.coverCloudPutTextField.text = self.groupedSink[ZipRestThat.heartHowLead.hasScalePenKey];
    [self accordingImmediatePreventPingTatarWayView:self.coverCloudPutTextField text:ZipRestThat.useCatAliveLow.menFactoryTightSoftnessSystolic];
    [self.view addSubview:self.coverCloudPutTextField];
    [self.coverCloudPutTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.carFaxRenameTextField.mas_bottom).offset(ZipRestThat.heartHowLead.zeroChecksum);
        make.left.right.equalTo(self.carFaxRenameTextField);
        make.height.mas_equalTo(ZipRestThat.heartHowLead.tabMatrixYet);
    }];
    
    
    UIButton *exportButButton = [ZipRestThat subgroupHigherSharpenRunWeekColor:ZipRestThat.useCatAliveLow.challengeUnfocusedAccessoryStickyKind];
    [exportButButton addTarget:self action:@selector(custodianMightPetiteClientsServerAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:exportButButton];
    [exportButButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.coverCloudPutTextField.mas_bottom).offset(ZipRestThat.heartHowLead.zeroChecksum);
        make.left.right.equalTo(self.coverCloudPutTextField);
        make.height.mas_equalTo(ZipRestThat.heartHowLead.proceedMolar);
    }];
    
    
    self.burnStayOneButton = [ZipRestThat descendPortraitsGurationProjectsFree:ZipRestThat.useCatAliveLow.contentExternMountedLogBordersPreserve];
    [self.burnStayOneButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.burnStayOneButton addTarget:self action:@selector(burnMalteseWorkoutRomanianThicknessAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.burnStayOneButton];
    [self.burnStayOneButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(exportButButton.mas_bottom).offset(ZipRestThat.heartHowLead.drumHallSum);
        make.centerX.equalTo(self.view);
    }];
}

- (void)accordingImmediatePreventPingTatarWayView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(ZipRestThat.heartHowLead.proceedMolar, ZipRestThat.heartHowLead.tabMatrixYet)};
    UILabel *echoMale = [[UILabel alloc] initWithFrame:frame];
    echoMale.text = text;
    echoMale.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = echoMale;
}

- (void)burnMalteseWorkoutRomanianThicknessAction:(UIButton *)sender {
    [[DigitSongManager shared] latitudeStaleWonChunkRotationHostViewController:self.navigationController];
}

- (void)custodianMightPetiteClientsServerAction:(UIButton *)sender {
    sender.hidden = YES;
    self.servicesLabel.hidden = YES;
    self.polarDrumView.hidden = NO;
    self.preferredView.hidden = NO;
    self.burnStayOneButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(ZipRestThat.heartHowLead.didLazyReplacedAnchorsLateWidth, ZipRestThat.heartHowLead.allGreatHashTouchesPrecisionWrist-ZipRestThat.heartHowLead.warningAlarm));
    }];
    [self.carFaxRenameTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.polarDrumView.mas_bottom).offset(ZipRestThat.heartHowLead.zeroChecksum);
    }];
    [self.view layoutIfNeeded];
    
    BOOL sheet = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:ZipRestThat.heartHowLead.crossSubGainActionSunComposerDivide];
    if (!sheet) {
        self.halfWayPopButton.hidden = NO;
        [IllAlertView outsideTwistCenteredEmergencyIntegersLose:nil message:ZipRestThat.useCatAliveLow.personExplicitYouGrandsonFit completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= ZipRestThat.heartHowLead.caffeineLead;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:lambdaLineTooOriginColorArtery:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image lambdaLineTooOriginColorArtery:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[DigitSongManager shared] latitudeStaleWonChunkRotationHostViewController:self.navigationController];
        [AnyToast fifteen:ZipRestThat.useCatAliveLow.nowPreparedAllocatePhaseLoops];
    }else {
        self.halfWayPopButton.hidden = NO;
        [IllAlertView outsideTwistCenteredEmergencyIntegersLose:nil message:ZipRestThat.useCatAliveLow.personExplicitYouGrandsonFit completion:nil];
    }
}

@end
