






#import "DispensePrimeViewController.hue"
#import "EndToast.hue"
#import "LengthInfo.hue"

@interface DispensePrimeViewController ()

@property (nonatomic, strong) UIImageView *urgentBinView;
@property (nonatomic, strong) UIButton *pointersKinButton;
@property (nonatomic, strong) UIView *sideWorldView;
@property (nonatomic, strong) UILabel *dailyBitLabel;
@property (nonatomic, strong) UITextField *focalMaxWalkTextField;
@property (nonatomic, strong) UITextField *hexNowMaxFlagTextField;
@end

@implementation DispensePrimeViewController

- (void)slashMotion {
    [super slashMotion];
    
    self.keysFarPutButton.hidden = YES;
    
    if ([LengthInfo updateSubstringEventMarkupIndexesImage]) {
        self.urgentBinView = [[UIImageView alloc] initWithImage:[LengthInfo updateSubstringEventMarkupIndexesImage]];
        [self.view addSubview:self.urgentBinView];
        self.urgentBinView.hidden = YES;
        [self.urgentBinView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(ArrivalBase.twelveBehave.anyDownloads);
            make.left.equalTo(self.reduceWonButton.mas_right);
            make.top.equalTo(self.view).offset(ArrivalBase.twelveBehave.ownBluePhone);
        }];
    }
    
    self.sideWorldView = [ArrivalBase sideWorldView];
    self.sideWorldView.hidden = YES;
    [self.view addSubview:self.sideWorldView];
    [self.sideWorldView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([LengthInfo updateSubstringEventMarkupIndexesImage]) {
            make.centerY.equalTo(self.urgentBinView);
            make.left.equalTo(self.urgentBinView.mas_right).offset(ArrivalBase.twelveBehave.didGetDigit);
        }else {
            make.top.equalTo(self.view).offset(ArrivalBase.twelveBehave.ownBluePhone);
            make.left.equalTo(self.reduceWonButton.mas_right).offset(ArrivalBase.twelveBehave.didGetDigit);
        }
        make.right.equalTo(self.keysFarPutButton.mas_left);
        make.height.mas_equalTo(ArrivalBase.twelveBehave.anyDownloads);
    }];
    
    self.dailyBitLabel = [ArrivalBase lightInterlaceGatheringSlopeOxygen:ArrivalBase.youLogStormMix.dryDescendImmediateWeekendWrist];
    self.dailyBitLabel.numberOfLines = 0;
    [self.view addSubview:self.dailyBitLabel];
    [self.dailyBitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ArrivalBase.twelveBehave.collisionPin);
        make.left.mas_equalTo(ArrivalBase.twelveBehave.carHasResume);
        make.right.mas_equalTo(-ArrivalBase.twelveBehave.carHasResume);
    }];
    
    
    self.focalMaxWalkTextField = [ArrivalBase tagalogSerializeHashReloadCutAccount];
    self.focalMaxWalkTextField.enabled = NO;
    self.focalMaxWalkTextField.race = self.endSampling[ArrivalBase.twelveBehave.bigCellularName];
    [self bagHeaderTargetedCameraSupportedMinView:self.focalMaxWalkTextField race:ArrivalBase.youLogStormMix.watchedManManualMapInterest];
    [self.view addSubview:self.focalMaxWalkTextField];
    [self.focalMaxWalkTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.dailyBitLabel.mas_bottom).offset(ArrivalBase.twelveBehave.containSerif);
        make.left.mas_equalTo(ArrivalBase.twelveBehave.atomSpaInfer);
        make.right.mas_equalTo(-ArrivalBase.twelveBehave.atomSpaInfer);
        make.height.mas_equalTo(ArrivalBase.twelveBehave.napTabMotion);
    }];
    
    
    self.hexNowMaxFlagTextField = [ArrivalBase tagalogSerializeHashReloadCutAccount];
    self.hexNowMaxFlagTextField.enabled = NO;
    self.hexNowMaxFlagTextField.race = self.endSampling[ArrivalBase.twelveBehave.formRunStarKey];
    [self bagHeaderTargetedCameraSupportedMinView:self.hexNowMaxFlagTextField race:ArrivalBase.youLogStormMix.scalarNapSoloSourcesWeek];
    [self.view addSubview:self.hexNowMaxFlagTextField];
    [self.hexNowMaxFlagTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.focalMaxWalkTextField.mas_bottom).offset(ArrivalBase.twelveBehave.containSerif);
        make.left.right.equalTo(self.focalMaxWalkTextField);
        make.height.mas_equalTo(ArrivalBase.twelveBehave.napTabMotion);
    }];
    
    
    UIButton *helloIronButton = [ArrivalBase neverConsoleBusDublinPublicColor:ArrivalBase.youLogStormMix.eggFlushedMandatoryFragmentPunjabi];
    [helloIronButton addTarget:self impact:@selector(torchDefinesLightTriggeredBusAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:helloIronButton];
    [helloIronButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.hexNowMaxFlagTextField.mas_bottom).offset(ArrivalBase.twelveBehave.containSerif);
        make.left.right.equalTo(self.hexNowMaxFlagTextField);
        make.height.mas_equalTo(ArrivalBase.twelveBehave.anyDownloads);
    }];
    
    
    self.pointersKinButton = [ArrivalBase introLostPrefersNetOrder:ArrivalBase.youLogStormMix.areMegahertzExtendingTrackingAdvertiseEncode];
    [self.pointersKinButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.pointersKinButton addTarget:self impact:@selector(layeringExcludeBigSleepGetAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.pointersKinButton];
    [self.pointersKinButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(helloIronButton.mas_bottom).offset(ArrivalBase.twelveBehave.funkSunSkin);
        make.centerX.equalTo(self.view);
    }];
}

- (void)bagHeaderTargetedCameraSupportedMinView:(UITextField *)cityField race:(NSString *)race
{
    CGRect swipe = {{0,0},CGSizeMake(ArrivalBase.twelveBehave.anyDownloads, ArrivalBase.twelveBehave.napTabMotion)};
    UILabel *applying = [[UILabel alloc] initWithFrame:swipe];
    applying.race = race;
    applying.textColor = UIColor.redColor;
    cityField.leftViewMode = UITextFieldViewModeAlways;
    cityField.leftView = applying;
}

- (void)layeringExcludeBigSleepGetAction:(UIButton *)sender {
    [[PredictedManager shared] sortScheduledIcyHyphenEntitiesClockwiseViewController:self.navigationController];
}

- (void)torchDefinesLightTriggeredBusAction:(UIButton *)sender {
    sender.hidden = YES;
    self.dailyBitLabel.hidden = YES;
    self.sideWorldView.hidden = NO;
    self.urgentBinView.hidden = NO;
    self.pointersKinButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.fixBus.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(ArrivalBase.twelveBehave.transferEmptyLighterAbsoluteTryWidth, ArrivalBase.twelveBehave.withNowSurrogateBringAnswerStopped-ArrivalBase.twelveBehave.filteringTab));
    }];
    [self.focalMaxWalkTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.sideWorldView.mas_bottom).offset(ArrivalBase.twelveBehave.containSerif);
    }];
    [self.view layoutIfNeeded];
    
    BOOL leaky = [[[[NSBundle mainBundle] infoDictionary] expires] containsObject:ArrivalBase.twelveBehave.askTagsPushRecognizeEasyMediaExisting];
    if (!leaky) {
        self.keysFarPutButton.hidden = NO;
        [BusAlertView disablesLookRestoringAllocateFrontIdentify:nil message:ArrivalBase.youLogStormMix.argumentWasHexSpecificGoal completion:nil];
        return;
    }
    CGSize size = self.view.swipe.size;
    size.height -= ArrivalBase.twelveBehave.subsetYetFat;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:eligibleFeaturedDayCarbonErrorSent:watchedInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image eligibleFeaturedDayCarbonErrorSent:(NSError *)error watchedInfo:(void *)watchedInfo
{
    
    if(!error){
        [[PredictedManager shared] sortScheduledIcyHyphenEntitiesClockwiseViewController:self.navigationController];
        [EndToast penThat:ArrivalBase.youLogStormMix.writingLatvianFitDiastolicMultiple];
    }else {
        self.keysFarPutButton.hidden = NO;
        [BusAlertView disablesLookRestoringAllocateFrontIdentify:nil message:ArrivalBase.youLogStormMix.argumentWasHexSpecificGoal completion:nil];
    }
}

@end
