






#import "PriceRaceWrapViewController.h"
#import "WasToast.h"
#import "TheMinInfo.h"

@interface PriceRaceWrapViewController ()

@property (nonatomic, strong) UIImageView *cupBiotinView;
@property (nonatomic, strong) UIButton *certSuchFatButton;
@property (nonatomic, strong) UIView *renewOpenView;
@property (nonatomic, strong) UILabel *supportsLabel;
@property (nonatomic, strong) UITextField *loadAllFarsiTextField;
@property (nonatomic, strong) UITextField *miterHandballTextField;
@end

@implementation PriceRaceWrapViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.volumesIllButton.hidden = YES;
    
    if ([TheMinInfo bevelCharMayBlueRevealImage]) {
        self.cupBiotinView = [[UIImageView alloc] initWithImage:[TheMinInfo bevelCharMayBlueRevealImage]];
        [self.view addSubview:self.cupBiotinView];
        self.cupBiotinView.hidden = YES;
        [self.cupBiotinView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(DiscardsOld.dogPongRoman.mayTorchSort);
            make.left.equalTo(self.waterWarpButton.mas_right);
            make.top.equalTo(self.view).offset(DiscardsOld.dogPongRoman.vendorAskIcy);
        }];
    }
    
    self.renewOpenView = [DiscardsOld renewOpenView];
    self.renewOpenView.hidden = YES;
    [self.view addSubview:self.renewOpenView];
    [self.renewOpenView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([TheMinInfo bevelCharMayBlueRevealImage]) {
            make.centerY.equalTo(self.cupBiotinView);
            make.left.equalTo(self.cupBiotinView.mas_right).offset(DiscardsOld.dogPongRoman.filterSlope);
        }else {
            make.top.equalTo(self.view).offset(DiscardsOld.dogPongRoman.vendorAskIcy);
            make.left.equalTo(self.waterWarpButton.mas_right).offset(DiscardsOld.dogPongRoman.filterSlope);
        }
        make.right.equalTo(self.volumesIllButton.mas_left);
        make.height.mas_equalTo(DiscardsOld.dogPongRoman.mayTorchSort);
    }];
    
    self.supportsLabel = [DiscardsOld eyeTruncatesNodeDropAxes:DiscardsOld.forceParameter.additionInfiniteMantissaOceanAway];
    self.supportsLabel.numberOfLines = 0;
    [self.view addSubview:self.supportsLabel];
    [self.supportsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(DiscardsOld.dogPongRoman.veryStormAnd);
        make.left.mas_equalTo(DiscardsOld.dogPongRoman.seasonManBig);
        make.right.mas_equalTo(-DiscardsOld.dogPongRoman.seasonManBig);
    }];
    
    
    self.loadAllFarsiTextField = [DiscardsOld nepaliKoreanEstimatedClampedPetiteAccount];
    self.loadAllFarsiTextField.enabled = NO;
    self.loadAllFarsiTextField.text = self.purpleNonce[DiscardsOld.dogPongRoman.ageViewRoleName];
    [self stoneGigahertzDayTheGallonPeriodicView:self.loadAllFarsiTextField text:DiscardsOld.forceParameter.spaOwnMostlyProblemKit];
    [self.view addSubview:self.loadAllFarsiTextField];
    [self.loadAllFarsiTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.supportsLabel.mas_bottom).offset(DiscardsOld.dogPongRoman.zipEarScheme);
        make.left.mas_equalTo(DiscardsOld.dogPongRoman.rowSpaceSide);
        make.right.mas_equalTo(-DiscardsOld.dogPongRoman.rowSpaceSide);
        make.height.mas_equalTo(DiscardsOld.dogPongRoman.balticMayFun);
    }];
    
    
    self.miterHandballTextField = [DiscardsOld nepaliKoreanEstimatedClampedPetiteAccount];
    self.miterHandballTextField.enabled = NO;
    self.miterHandballTextField.text = self.purpleNonce[DiscardsOld.dogPongRoman.meterEarKitKey];
    [self stoneGigahertzDayTheGallonPeriodicView:self.miterHandballTextField text:DiscardsOld.forceParameter.effectProvidersAssemblyEntropyTry];
    [self.view addSubview:self.miterHandballTextField];
    [self.miterHandballTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.loadAllFarsiTextField.mas_bottom).offset(DiscardsOld.dogPongRoman.zipEarScheme);
        make.left.right.equalTo(self.loadAllFarsiTextField);
        make.height.mas_equalTo(DiscardsOld.dogPongRoman.balticMayFun);
    }];
    
    
    UIButton *socketRedButton = [DiscardsOld separateYahooSlideCompositeIllColor:DiscardsOld.forceParameter.minWristSugarManagersHundred];
    [socketRedButton addTarget:self action:@selector(offerMandatoryPacketWakeSoloistAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:socketRedButton];
    [socketRedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.miterHandballTextField.mas_bottom).offset(DiscardsOld.dogPongRoman.zipEarScheme);
        make.left.right.equalTo(self.miterHandballTextField);
        make.height.mas_equalTo(DiscardsOld.dogPongRoman.mayTorchSort);
    }];
    
    
    self.certSuchFatButton = [DiscardsOld envelopeSixteenHoursCreateStrategy:DiscardsOld.forceParameter.prettySeeRelatedEarMarathiVisited];
    [self.certSuchFatButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.certSuchFatButton addTarget:self action:@selector(slideMethodFactReceiverTagAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.certSuchFatButton];
    [self.certSuchFatButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(socketRedButton.mas_bottom).offset(DiscardsOld.dogPongRoman.dropAudited);
        make.centerX.equalTo(self.view);
    }];
}

- (void)stoneGigahertzDayTheGallonPeriodicView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(DiscardsOld.dogPongRoman.mayTorchSort, DiscardsOld.dogPongRoman.balticMayFun)};
    UILabel *napWatch = [[UILabel alloc] initWithFrame:frame];
    napWatch.text = text;
    napWatch.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = napWatch;
}

- (void)slideMethodFactReceiverTagAction:(UIButton *)sender {
    [[SpecifierManager shared] lossFunTrainerPassivelyCocoaAppendViewController:self.navigationController];
}

- (void)offerMandatoryPacketWakeSoloistAction:(UIButton *)sender {
    sender.hidden = YES;
    self.supportsLabel.hidden = YES;
    self.renewOpenView.hidden = NO;
    self.cupBiotinView.hidden = NO;
    self.certSuchFatButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(DiscardsOld.dogPongRoman.workSparseReversesEnterBadWidth, DiscardsOld.dogPongRoman.causeSheEmailSmallestColorUndone-DiscardsOld.dogPongRoman.rowsUnderage));
    }];
    [self.loadAllFarsiTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.renewOpenView.mas_bottom).offset(DiscardsOld.dogPongRoman.zipEarScheme);
    }];
    [self.view layoutIfNeeded];
    
    BOOL daily = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:DiscardsOld.dogPongRoman.proposalLetterDeepArtworkEllipseVisitorBleed];
    if (!daily) {
        self.volumesIllButton.hidden = NO;
        [OddAlertView settingsHuePresenterLappishVisibleMetal:nil message:DiscardsOld.forceParameter.joinOffsetsTaggingPictureCompared completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= DiscardsOld.dogPongRoman.dynamicPhone;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:unionSlightBurstReleasedStartKernels:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image unionSlightBurstReleasedStartKernels:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[SpecifierManager shared] lossFunTrainerPassivelyCocoaAppendViewController:self.navigationController];
        [WasToast tickets:DiscardsOld.forceParameter.licenseCallUnfocusedCollapsedBar];
    }else {
        self.volumesIllButton.hidden = NO;
        [OddAlertView settingsHuePresenterLappishVisibleMetal:nil message:DiscardsOld.forceParameter.joinOffsetsTaggingPictureCompared completion:nil];
    }
}

@end
