






#import "BridgingTowerViewController.h"
#import "OffToast.h"
#import "SawWaxInfo.h"

@interface BridgingTowerViewController ()

@property (nonatomic, strong) UIImageView *knowBlackView;
@property (nonatomic, strong) UIButton *scoreSubTenButton;
@property (nonatomic, strong) UIView *dustHertzView;
@property (nonatomic, strong) UILabel *boundaryLabel;
@property (nonatomic, strong) UITextField *handlesFloorTextField;
@property (nonatomic, strong) UITextField *cutMetricsRawTextField;
@end

@implementation BridgingTowerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.maskHeaderButton.hidden = YES;
    
    if ([SawWaxInfo arbiterMenuAddressComposeAllImage]) {
        self.knowBlackView = [[UIImageView alloc] initWithImage:[SawWaxInfo arbiterMenuAddressComposeAllImage]];
        [self.view addSubview:self.knowBlackView];
        self.knowBlackView.hidden = YES;
        [self.knowBlackView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(InvertPinch.didThousands.jouleIterate);
            make.left.equalTo(self.ovulationButton.mas_right);
            make.top.equalTo(self.view).offset(InvertPinch.didThousands.stereoPartly);
        }];
    }
    
    self.dustHertzView = [InvertPinch dustHertzView];
    self.dustHertzView.hidden = YES;
    [self.view addSubview:self.dustHertzView];
    [self.dustHertzView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([SawWaxInfo arbiterMenuAddressComposeAllImage]) {
            make.centerY.equalTo(self.knowBlackView);
            make.left.equalTo(self.knowBlackView.mas_right).offset(InvertPinch.didThousands.repairPower);
        }else {
            make.top.equalTo(self.view).offset(InvertPinch.didThousands.stereoPartly);
            make.left.equalTo(self.ovulationButton.mas_right).offset(InvertPinch.didThousands.repairPower);
        }
        make.right.equalTo(self.maskHeaderButton.mas_left);
        make.height.mas_equalTo(InvertPinch.didThousands.jouleIterate);
    }];
    
    self.boundaryLabel = [InvertPinch contactsFarUnsavedAxesTrial:InvertPinch.knowSunTalkHas.factoredBadFourDatumWindow];
    self.boundaryLabel.numberOfLines = 0;
    [self.view addSubview:self.boundaryLabel];
    [self.boundaryLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(InvertPinch.didThousands.claimFlipped);
        make.left.mas_equalTo(InvertPinch.didThousands.illBitNepali);
        make.right.mas_equalTo(-InvertPinch.didThousands.illBitNepali);
    }];
    
    
    self.handlesFloorTextField = [InvertPinch subfamilyAmountSmartBeganHourlyAccount];
    self.handlesFloorTextField.enabled = NO;
    self.handlesFloorTextField.text = self.ownAutoGolf[InvertPinch.didThousands.drawUniformName];
    [self aboveTightHelloGrandauntChunkKilobitsView:self.handlesFloorTextField text:InvertPinch.knowSunTalkHas.projectsClickedEscapingEntropyLocalized];
    [self.view addSubview:self.handlesFloorTextField];
    [self.handlesFloorTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.boundaryLabel.mas_bottom).offset(InvertPinch.didThousands.lexiconTilde);
        make.left.mas_equalTo(InvertPinch.didThousands.redoAddition);
        make.right.mas_equalTo(-InvertPinch.didThousands.redoAddition);
        make.height.mas_equalTo(InvertPinch.didThousands.wordMagicBag);
    }];
    
    
    self.cutMetricsRawTextField = [InvertPinch subfamilyAmountSmartBeganHourlyAccount];
    self.cutMetricsRawTextField.enabled = NO;
    self.cutMetricsRawTextField.text = self.ownAutoGolf[InvertPinch.didThousands.clickEggPinKey];
    [self aboveTightHelloGrandauntChunkKilobitsView:self.cutMetricsRawTextField text:InvertPinch.knowSunTalkHas.valueBottomTheConsoleTurn];
    [self.view addSubview:self.cutMetricsRawTextField];
    [self.cutMetricsRawTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.handlesFloorTextField.mas_bottom).offset(InvertPinch.didThousands.lexiconTilde);
        make.left.right.equalTo(self.handlesFloorTextField);
        make.height.mas_equalTo(InvertPinch.didThousands.wordMagicBag);
    }];
    
    
    UIButton *drawCleanButton = [InvertPinch greekSampleAffineEpisodeDownColor:InvertPinch.knowSunTalkHas.hierarchyParticleAnyHoursMap];
    [drawCleanButton addTarget:self action:@selector(floatDestroyBasqueLoopsAnimationAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:drawCleanButton];
    [drawCleanButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.cutMetricsRawTextField.mas_bottom).offset(InvertPinch.didThousands.lexiconTilde);
        make.left.right.equalTo(self.cutMetricsRawTextField);
        make.height.mas_equalTo(InvertPinch.didThousands.jouleIterate);
    }];
    
    
    self.scoreSubTenButton = [InvertPinch leastSenderDirectIdleView:InvertPinch.knowSunTalkHas.successMakerFloatDevicesBayerViolation];
    [self.scoreSubTenButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.scoreSubTenButton addTarget:self action:@selector(brushNapModernGreaterElderAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.scoreSubTenButton];
    [self.scoreSubTenButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(drawCleanButton.mas_bottom).offset(InvertPinch.didThousands.sugarAssign);
        make.centerX.equalTo(self.view);
    }];
}

- (void)aboveTightHelloGrandauntChunkKilobitsView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(InvertPinch.didThousands.jouleIterate, InvertPinch.didThousands.wordMagicBag)};
    UILabel *backOver = [[UILabel alloc] initWithFrame:frame];
    backOver.text = text;
    backOver.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = backOver;
}

- (void)brushNapModernGreaterElderAction:(UIButton *)sender {
    [[UploadWhoManager shared] fastHueArteryDriveReversesCarriageViewController:self.navigationController];
}

- (void)floatDestroyBasqueLoopsAnimationAction:(UIButton *)sender {
    sender.hidden = YES;
    self.boundaryLabel.hidden = YES;
    self.dustHertzView.hidden = NO;
    self.knowBlackView.hidden = NO;
    self.scoreSubTenButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(InvertPinch.didThousands.keyAscendedLinearDidAutoWidth, InvertPinch.didThousands.pairDenyOrderedWaxMissingConsumes-InvertPinch.didThousands.penDiacritic));
    }];
    [self.handlesFloorTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.dustHertzView.mas_bottom).offset(InvertPinch.didThousands.lexiconTilde);
    }];
    [self.view layoutIfNeeded];
    
    BOOL fully = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:InvertPinch.didThousands.inviteDensityInitialInsulinSocketQueueShe];
    if (!fully) {
        self.maskHeaderButton.hidden = NO;
        [BigAlertView clickPatternsRegionUnloadPopSemantic:nil message:InvertPinch.knowSunTalkHas.farSundanesePluralAlbumSob completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= InvertPinch.didThousands.spineCompact;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:mandarinExitsInspiredBufferingSeeAnd:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image mandarinExitsInspiredBufferingSeeAnd:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[UploadWhoManager shared] fastHueArteryDriveReversesCarriageViewController:self.navigationController];
        [OffToast jobMode:InvertPinch.knowSunTalkHas.subtitlesIgnoresMusicianSchoolSpoken];
    }else {
        self.maskHeaderButton.hidden = NO;
        [BigAlertView clickPatternsRegionUnloadPopSemantic:nil message:InvertPinch.knowSunTalkHas.farSundanesePluralAlbumSob completion:nil];
    }
}

@end
