






#import "SumArtBagSizeViewController.h"
#import "SinToast.h"
#import "IndianInfo.h"

@interface SumArtBagSizeViewController ()

@property (nonatomic, strong) UIImageView *chromaWonView;
@property (nonatomic, strong) UIButton *busEligibleButton;
@property (nonatomic, strong) UIView *headerTooView;
@property (nonatomic, strong) UILabel *personalLabel;
@property (nonatomic, strong) UITextField *familyHeightTextField;
@property (nonatomic, strong) UITextField *neverSelectedTextField;
@end

@implementation SumArtBagSizeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.skipAllUseButton.hidden = YES;
    
    if ([IndianInfo copyrightWrongSnapRespondShearImage]) {
        self.chromaWonView = [[UIImageView alloc] initWithImage:[IndianInfo copyrightWrongSnapRespondShearImage]];
        [self.view addSubview:self.chromaWonView];
        self.chromaWonView.hidden = YES;
        [self.chromaWonView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(PintResting.findClickCat.artThousands);
            make.left.equalTo(self.lostRightButton.mas_right);
            make.top.equalTo(self.view).offset(PintResting.findClickCat.askSegmented);
        }];
    }
    
    self.headerTooView = [PintResting headerTooView];
    self.headerTooView.hidden = YES;
    [self.view addSubview:self.headerTooView];
    [self.headerTooView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([IndianInfo copyrightWrongSnapRespondShearImage]) {
            make.centerY.equalTo(self.chromaWonView);
            make.left.equalTo(self.chromaWonView.mas_right).offset(PintResting.findClickCat.airCapsSign);
        }else {
            make.top.equalTo(self.view).offset(PintResting.findClickCat.askSegmented);
            make.left.equalTo(self.lostRightButton.mas_right).offset(PintResting.findClickCat.airCapsSign);
        }
        make.right.equalTo(self.skipAllUseButton.mas_left);
        make.height.mas_equalTo(PintResting.findClickCat.artThousands);
    }];
    
    self.personalLabel = [PintResting kannadaDanceCommandEditMemory:PintResting.exposeLeapAuto.dryBarOxygenSceneArbiter];
    self.personalLabel.numberOfLines = 0;
    [self.view addSubview:self.personalLabel];
    [self.personalLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PintResting.findClickCat.senseChanged);
        make.left.mas_equalTo(PintResting.findClickCat.advanceValue);
        make.right.mas_equalTo(-PintResting.findClickCat.advanceValue);
    }];
    
    
    self.familyHeightTextField = [PintResting userPopCampaignAllowWinAccount];
    self.familyHeightTextField.enabled = NO;
    self.familyHeightTextField.text = self.grandsonPop[PintResting.findClickCat.planCommandName];
    [self dryTallBackDogBounceHeapView:self.familyHeightTextField text:PintResting.exposeLeapAuto.failMinimumPassivelyFormatExpects];
    [self.view addSubview:self.familyHeightTextField];
    [self.familyHeightTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.personalLabel.mas_bottom).offset(PintResting.findClickCat.weekBlendTap);
        make.left.mas_equalTo(PintResting.findClickCat.redSeasonFax);
        make.right.mas_equalTo(-PintResting.findClickCat.redSeasonFax);
        make.height.mas_equalTo(PintResting.findClickCat.capHybridAre);
    }];
    
    
    self.neverSelectedTextField = [PintResting userPopCampaignAllowWinAccount];
    self.neverSelectedTextField.enabled = NO;
    self.neverSelectedTextField.text = self.grandsonPop[PintResting.findClickCat.cupCrossMixKey];
    [self dryTallBackDogBounceHeapView:self.neverSelectedTextField text:PintResting.exposeLeapAuto.layerDesignerPrimaryShutterAscender];
    [self.view addSubview:self.neverSelectedTextField];
    [self.neverSelectedTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.familyHeightTextField.mas_bottom).offset(PintResting.findClickCat.weekBlendTap);
        make.left.right.equalTo(self.familyHeightTextField);
        make.height.mas_equalTo(PintResting.findClickCat.capHybridAre);
    }];
    
    
    UIButton *chunkyFunButton = [PintResting serbianManInvokeSnapshotTwelveColor:PintResting.exposeLeapAuto.integrityPatchCellSliderDash];
    [chunkyFunButton addTarget:self action:@selector(bankersAlgorithmAfterSixWrapAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:chunkyFunButton];
    [chunkyFunButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.neverSelectedTextField.mas_bottom).offset(PintResting.findClickCat.weekBlendTap);
        make.left.right.equalTo(self.neverSelectedTextField);
        make.height.mas_equalTo(PintResting.findClickCat.artThousands);
    }];
    
    
    self.busEligibleButton = [PintResting bracketedHiddenIllClockwiseFetch:PintResting.exposeLeapAuto.hashLaunchedEnumerateCharacterReflectRotate];
    [self.busEligibleButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.busEligibleButton addTarget:self action:@selector(millionLoveCollationIllegalHundredsAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.busEligibleButton];
    [self.busEligibleButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(chunkyFunButton.mas_bottom).offset(PintResting.findClickCat.recordedAre);
        make.centerX.equalTo(self.view);
    }];
}

- (void)dryTallBackDogBounceHeapView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(PintResting.findClickCat.artThousands, PintResting.findClickCat.capHybridAre)};
    UILabel *parental = [[UILabel alloc] initWithFrame:frame];
    parental.text = text;
    parental.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = parental;
}

- (void)millionLoveCollationIllegalHundredsAction:(UIButton *)sender {
    [[IllBundleManager shared] dryPreciseCubicGetWetTargetedViewController:self.navigationController];
}

- (void)bankersAlgorithmAfterSixWrapAction:(UIButton *)sender {
    sender.hidden = YES;
    self.personalLabel.hidden = YES;
    self.headerTooView.hidden = NO;
    self.chromaWonView.hidden = NO;
    self.busEligibleButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(PintResting.findClickCat.primaryBandCanonSuccessFixWidth, PintResting.findClickCat.detectedAddConvertJustSnapBig-PintResting.findClickCat.tomorrowCase));
    }];
    [self.familyHeightTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.headerTooView.mas_bottom).offset(PintResting.findClickCat.weekBlendTap);
    }];
    [self.view layoutIfNeeded];
    
    BOOL brush = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:PintResting.findClickCat.unlockKeyRateHalftonePreviousNotPin];
    if (!brush) {
        self.skipAllUseButton.hidden = NO;
        [UseAlertView succeededTopPoolClipDanceQuerying:nil message:PintResting.exposeLeapAuto.assameseAlgorithmGermanMapDrive completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= PintResting.findClickCat.reclaimLiner;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:floatBitsRepeatDeleteScrollsHow:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image floatBitsRepeatDeleteScrollsHow:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[IllBundleManager shared] dryPreciseCubicGetWetTargetedViewController:self.navigationController];
        [SinToast easyLow:PintResting.exposeLeapAuto.rowsHeadSingularHerPoint];
    }else {
        self.skipAllUseButton.hidden = NO;
        [UseAlertView succeededTopPoolClipDanceQuerying:nil message:PintResting.exposeLeapAuto.assameseAlgorithmGermanMapDrive completion:nil];
    }
}

@end
