






#import "GrowMinHueFitViewController.h"
#import "FunToast.h"
#import "MemoryInfo.h"

@interface GrowMinHueFitViewController ()

@property (nonatomic, strong) UIImageView *createBagView;
@property (nonatomic, strong) UIButton *playingCardButton;
@property (nonatomic, strong) UIView *readRomanView;
@property (nonatomic, strong) UILabel *extraRawLabel;
@property (nonatomic, strong) UITextField *martialAboutTextField;
@property (nonatomic, strong) UITextField *tempLossShortTextField;
@end

@implementation GrowMinHueFitViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.hairRetainButton.hidden = YES;
    
    if ([MemoryInfo inuitCausePoolAllocatedReplaceImage]) {
        self.createBagView = [[UIImageView alloc] initWithImage:[MemoryInfo inuitCausePoolAllocatedReplaceImage]];
        [self.view addSubview:self.createBagView];
        self.createBagView.hidden = YES;
        [self.createBagView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(ReadWaxDash.strideFooter.noneTertiary);
            make.left.equalTo(self.bedNordicButton.mas_right);
            make.top.equalTo(self.view).offset(ReadWaxDash.strideFooter.slovenianCan);
        }];
    }
    
    self.readRomanView = [ReadWaxDash readRomanView];
    self.readRomanView.hidden = YES;
    [self.view addSubview:self.readRomanView];
    [self.readRomanView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([MemoryInfo inuitCausePoolAllocatedReplaceImage]) {
            make.centerY.equalTo(self.createBagView);
            make.left.equalTo(self.createBagView.mas_right).offset(ReadWaxDash.strideFooter.bagPipeThin);
        }else {
            make.top.equalTo(self.view).offset(ReadWaxDash.strideFooter.slovenianCan);
            make.left.equalTo(self.bedNordicButton.mas_right).offset(ReadWaxDash.strideFooter.bagPipeThin);
        }
        make.right.equalTo(self.hairRetainButton.mas_left);
        make.height.mas_equalTo(ReadWaxDash.strideFooter.noneTertiary);
    }];
    
    self.extraRawLabel = [ReadWaxDash cardioidStableSpouseOffSummary:ReadWaxDash.spaLiveIronTry.estimatedCommittedSeeCallbacksMoment];
    self.extraRawLabel.numberOfLines = 0;
    [self.view addSubview:self.extraRawLabel];
    [self.extraRawLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ReadWaxDash.strideFooter.arrowResults);
        make.left.mas_equalTo(ReadWaxDash.strideFooter.birthCarrier);
        make.right.mas_equalTo(-ReadWaxDash.strideFooter.birthCarrier);
    }];
    
    
    self.martialAboutTextField = [ReadWaxDash megabytesSlowComposePassiveHandshakeAccount];
    self.martialAboutTextField.enabled = NO;
    self.martialAboutTextField.text = self.cupEyeUnder[ReadWaxDash.strideFooter.icyResponseName];
    [self cellularEarFactoredUpperParticleKernelsView:self.martialAboutTextField text:ReadWaxDash.spaLiveIronTry.awaySeeManualSliderIndexed];
    [self.view addSubview:self.martialAboutTextField];
    [self.martialAboutTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.extraRawLabel.mas_bottom).offset(ReadWaxDash.strideFooter.renderedLook);
        make.left.mas_equalTo(ReadWaxDash.strideFooter.canUsesLeast);
        make.right.mas_equalTo(-ReadWaxDash.strideFooter.canUsesLeast);
        make.height.mas_equalTo(ReadWaxDash.strideFooter.armenianPair);
    }];
    
    
    self.tempLossShortTextField = [ReadWaxDash megabytesSlowComposePassiveHandshakeAccount];
    self.tempLossShortTextField.enabled = NO;
    self.tempLossShortTextField.text = self.cupEyeUnder[ReadWaxDash.strideFooter.blobClampedKey];
    [self cellularEarFactoredUpperParticleKernelsView:self.tempLossShortTextField text:ReadWaxDash.spaLiveIronTry.sizePhaseGarbageModernWake];
    [self.view addSubview:self.tempLossShortTextField];
    [self.tempLossShortTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.martialAboutTextField.mas_bottom).offset(ReadWaxDash.strideFooter.renderedLook);
        make.left.right.equalTo(self.martialAboutTextField);
        make.height.mas_equalTo(ReadWaxDash.strideFooter.armenianPair);
    }];
    
    
    UIButton *rareCrossButton = [ReadWaxDash ownNumbersFocusedWaistHebrewColor:ReadWaxDash.spaLiveIronTry.illTriggerMantissaPurpleTwo];
    [rareCrossButton addTarget:self action:@selector(modifiersExpectingWeightedSpatialAddressAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:rareCrossButton];
    [rareCrossButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tempLossShortTextField.mas_bottom).offset(ReadWaxDash.strideFooter.renderedLook);
        make.left.right.equalTo(self.tempLossShortTextField);
        make.height.mas_equalTo(ReadWaxDash.strideFooter.noneTertiary);
    }];
    
    
    self.playingCardButton = [ReadWaxDash afterAssistantOccurTintDry:ReadWaxDash.spaLiveIronTry.themeAdoptFourPencilDrivenCollapses];
    [self.playingCardButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.playingCardButton addTarget:self action:@selector(withinGrowDaySymbolicOddAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.playingCardButton];
    [self.playingCardButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(rareCrossButton.mas_bottom).offset(ReadWaxDash.strideFooter.pinStaleWon);
        make.centerX.equalTo(self.view);
    }];
}

- (void)cellularEarFactoredUpperParticleKernelsView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(ReadWaxDash.strideFooter.noneTertiary, ReadWaxDash.strideFooter.armenianPair)};
    UILabel *rankRank = [[UILabel alloc] initWithFrame:frame];
    rankRank.text = text;
    rankRank.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = rankRank;
}

- (void)withinGrowDaySymbolicOddAction:(UIButton *)sender {
    [[StandCapsManager shared] fitIllSobProducesEscapedPowerViewController:self.navigationController];
}

- (void)modifiersExpectingWeightedSpatialAddressAction:(UIButton *)sender {
    sender.hidden = YES;
    self.extraRawLabel.hidden = YES;
    self.readRomanView.hidden = NO;
    self.createBagView.hidden = NO;
    self.playingCardButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(ReadWaxDash.strideFooter.capsRevealedReportsFactorDashWidth, ReadWaxDash.strideFooter.fetchNowCancelOwnFrontGiven-ReadWaxDash.strideFooter.faxReverting));
    }];
    [self.martialAboutTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.readRomanView.mas_bottom).offset(ReadWaxDash.strideFooter.renderedLook);
    }];
    [self.view layoutIfNeeded];
    
    BOOL evict = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:ReadWaxDash.strideFooter.sparseColorReleaseBriefStepchildSelectGrandson];
    if (!evict) {
        self.hairRetainButton.hidden = NO;
        [TenAlertView unlockLocalizedExistingStructureManagedTab:nil message:ReadWaxDash.spaLiveIronTry.feedEventGatherExposureSlight completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= ReadWaxDash.strideFooter.ellipseRound;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:creationFourArgumentRectangleShortAttempter:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image creationFourArgumentRectangleShortAttempter:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[StandCapsManager shared] fitIllSobProducesEscapedPowerViewController:self.navigationController];
        [FunToast pubRule:ReadWaxDash.spaLiveIronTry.carrierTextInterlaceBarriersProvided];
    }else {
        self.hairRetainButton.hidden = NO;
        [TenAlertView unlockLocalizedExistingStructureManagedTab:nil message:ReadWaxDash.spaLiveIronTry.feedEventGatherExposureSlight completion:nil];
    }
}

@end
