






#import "ShipmentBoundViewController.h"
#import "SawToast.h"
#import "InvokeInfo.h"

@interface ShipmentBoundViewController ()

@property (nonatomic, strong) UIImageView *filterRedView;
@property (nonatomic, strong) UIButton *liftSeeNearButton;
@property (nonatomic, strong) UIView *relayArtsView;
@property (nonatomic, strong) UILabel *pauseJobLabel;
@property (nonatomic, strong) UITextField *tailWasBringTextField;
@property (nonatomic, strong) UITextField *issueDogCocoaTextField;
@end

@implementation ShipmentBoundViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.warpFitWonButton.hidden = YES;
    
    if ([InvokeInfo insetRealOpticalCurlUsesImage]) {
        self.filterRedView = [[UIImageView alloc] initWithImage:[InvokeInfo insetRealOpticalCurlUsesImage]];
        [self.view addSubview:self.filterRedView];
        self.filterRedView.hidden = YES;
        [self.filterRedView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(SobIllWelsh.followBigKit.floatWaxPlus);
            make.left.equalTo(self.diskGenreButton.mas_right);
            make.top.equalTo(self.view).offset(SobIllWelsh.followBigKit.herPreserved);
        }];
    }
    
    self.relayArtsView = [SobIllWelsh relayArtsView];
    self.relayArtsView.hidden = YES;
    [self.view addSubview:self.relayArtsView];
    [self.relayArtsView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([InvokeInfo insetRealOpticalCurlUsesImage]) {
            make.centerY.equalTo(self.filterRedView);
            make.left.equalTo(self.filterRedView.mas_right).offset(SobIllWelsh.followBigKit.tintDryYear);
        }else {
            make.top.equalTo(self.view).offset(SobIllWelsh.followBigKit.herPreserved);
            make.left.equalTo(self.diskGenreButton.mas_right).offset(SobIllWelsh.followBigKit.tintDryYear);
        }
        make.right.equalTo(self.warpFitWonButton.mas_left);
        make.height.mas_equalTo(SobIllWelsh.followBigKit.floatWaxPlus);
    }];
    
    self.pauseJobLabel = [SobIllWelsh referenceMajorRaceAngularBegan:SobIllWelsh.notHeapPeerRed.exponentsRefusedCelticStripDrum];
    self.pauseJobLabel.numberOfLines = 0;
    [self.view addSubview:self.pauseJobLabel];
    [self.pauseJobLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(SobIllWelsh.followBigKit.baseAgentRaw);
        make.left.mas_equalTo(SobIllWelsh.followBigKit.trackAreRedo);
        make.right.mas_equalTo(-SobIllWelsh.followBigKit.trackAreRedo);
    }];
    
    
    self.tailWasBringTextField = [SobIllWelsh batterySecurelyTryGetAppearsAccount];
    self.tailWasBringTextField.enabled = NO;
    self.tailWasBringTextField.text = self.retBlurTime[SobIllWelsh.followBigKit.activityTipName];
    [self flatExitsBoldShearFaxExactView:self.tailWasBringTextField text:SobIllWelsh.notHeapPeerRed.lowercaseCanonMidPrivilegeBuild];
    [self.view addSubview:self.tailWasBringTextField];
    [self.tailWasBringTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.pauseJobLabel.mas_bottom).offset(SobIllWelsh.followBigKit.canSlovakAge);
        make.left.mas_equalTo(SobIllWelsh.followBigKit.busStepAsset);
        make.right.mas_equalTo(-SobIllWelsh.followBigKit.busStepAsset);
        make.height.mas_equalTo(SobIllWelsh.followBigKit.elderRowsEar);
    }];
    
    
    self.issueDogCocoaTextField = [SobIllWelsh batterySecurelyTryGetAppearsAccount];
    self.issueDogCocoaTextField.enabled = NO;
    self.issueDogCocoaTextField.text = self.retBlurTime[SobIllWelsh.followBigKit.idleDecimalKey];
    [self flatExitsBoldShearFaxExactView:self.issueDogCocoaTextField text:SobIllWelsh.notHeapPeerRed.lowSonShoulderFormUnit];
    [self.view addSubview:self.issueDogCocoaTextField];
    [self.issueDogCocoaTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tailWasBringTextField.mas_bottom).offset(SobIllWelsh.followBigKit.canSlovakAge);
        make.left.right.equalTo(self.tailWasBringTextField);
        make.height.mas_equalTo(SobIllWelsh.followBigKit.elderRowsEar);
    }];
    
    
    UIButton *sequencesButton = [SobIllWelsh allExistExecutionCreditsJumpColor:SobIllWelsh.notHeapPeerRed.universalCloudAllergyBetweenVendor];
    [sequencesButton addTarget:self action:@selector(detectedGravityContainerSheOutcomeAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:sequencesButton];
    [sequencesButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.issueDogCocoaTextField.mas_bottom).offset(SobIllWelsh.followBigKit.canSlovakAge);
        make.left.right.equalTo(self.issueDogCocoaTextField);
        make.height.mas_equalTo(SobIllWelsh.followBigKit.floatWaxPlus);
    }];
    
    
    self.liftSeeNearButton = [SobIllWelsh fullyPushCaptionMastersCascade:SobIllWelsh.notHeapPeerRed.finnishJumpSlovakRawPullBeacons];
    [self.liftSeeNearButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.liftSeeNearButton addTarget:self action:@selector(contrastCalciumMovieSliceTheAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.liftSeeNearButton];
    [self.liftSeeNearButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(sequencesButton.mas_bottom).offset(SobIllWelsh.followBigKit.shapeDryAge);
        make.centerX.equalTo(self.view);
    }];
}

- (void)flatExitsBoldShearFaxExactView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(SobIllWelsh.followBigKit.floatWaxPlus, SobIllWelsh.followBigKit.elderRowsEar)};
    UILabel *beenFeet = [[UILabel alloc] initWithFrame:frame];
    beenFeet.text = text;
    beenFeet.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = beenFeet;
}

- (void)contrastCalciumMovieSliceTheAction:(UIButton *)sender {
    [[SleepPairManager shared] cinematicLaunchedParameterInfinityIssueOtherViewController:self.navigationController];
}

- (void)detectedGravityContainerSheOutcomeAction:(UIButton *)sender {
    sender.hidden = YES;
    self.pauseJobLabel.hidden = YES;
    self.relayArtsView.hidden = NO;
    self.filterRedView.hidden = NO;
    self.liftSeeNearButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(SobIllWelsh.followBigKit.overflowItemClearYouSaltWidth, SobIllWelsh.followBigKit.lawElevationDenyElementsClusterRetain-SobIllWelsh.followBigKit.speakerUnify));
    }];
    [self.tailWasBringTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.relayArtsView.mas_bottom).offset(SobIllWelsh.followBigKit.canSlovakAge);
    }];
    [self.view layoutIfNeeded];
    
    BOOL brush = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:SobIllWelsh.followBigKit.boldSourcesAlpineEraSmoothingGraphicsNow];
    if (!brush) {
        self.warpFitWonButton.hidden = NO;
        [BitAlertView combinedSymbolsConjugateOptReuseFarthest:nil message:SobIllWelsh.notHeapPeerRed.slovakMaxJustifiedTrashBordered completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= SobIllWelsh.followBigKit.maxUpdateOwn;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:composeCarDueOnceSymptomGenerics:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image composeCarDueOnceSymptomGenerics:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[SleepPairManager shared] cinematicLaunchedParameterInfinityIssueOtherViewController:self.navigationController];
        [SawToast archive:SobIllWelsh.notHeapPeerRed.declinedSalientMostRoleCase];
    }else {
        self.warpFitWonButton.hidden = NO;
        [BitAlertView combinedSymbolsConjugateOptReuseFarthest:nil message:SobIllWelsh.notHeapPeerRed.slovakMaxJustifiedTrashBordered completion:nil];
    }
}

@end
