






#import "RetBurnBinNotViewController.h"
#import "HisToast.h"
#import "CutoffInfo.h"

@interface RetBurnBinNotViewController ()

@property (nonatomic, strong) UIImageView *manganeseView;
@property (nonatomic, strong) UIButton *sendBodyPutButton;
@property (nonatomic, strong) UIView *serializeView;
@property (nonatomic, strong) UILabel *mutationLabel;
@property (nonatomic, strong) UITextField *moleBoxQueueTextField;
@property (nonatomic, strong) UITextField *defineTornadoTextField;
@end

@implementation RetBurnBinNotViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.halfSixOwnButton.hidden = YES;
    
    if ([CutoffInfo airAdditiveViewConstantColoredImage]) {
        self.manganeseView = [[UIImageView alloc] initWithImage:[CutoffInfo airAdditiveViewConstantColoredImage]];
        [self.view addSubview:self.manganeseView];
        self.manganeseView.hidden = YES;
        [self.manganeseView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(LearnWeekly.reuseRenewal.notDriveFail);
            make.left.equalTo(self.quoteRateButton.mas_right);
            make.top.equalTo(self.view).offset(LearnWeekly.reuseRenewal.withinWayUse);
        }];
    }
    
    self.serializeView = [LearnWeekly serializeView];
    self.serializeView.hidden = YES;
    [self.view addSubview:self.serializeView];
    [self.serializeView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([CutoffInfo airAdditiveViewConstantColoredImage]) {
            make.centerY.equalTo(self.manganeseView);
            make.left.equalTo(self.manganeseView.mas_right).offset(LearnWeekly.reuseRenewal.burstVolume);
        }else {
            make.top.equalTo(self.view).offset(LearnWeekly.reuseRenewal.withinWayUse);
            make.left.equalTo(self.quoteRateButton.mas_right).offset(LearnWeekly.reuseRenewal.burstVolume);
        }
        make.right.equalTo(self.halfSixOwnButton.mas_left);
        make.height.mas_equalTo(LearnWeekly.reuseRenewal.notDriveFail);
    }];
    
    self.mutationLabel = [LearnWeekly escapingSleepNextInnerBattery:LearnWeekly.estonianBanner.magnitudeThatProjectPencilEffort];
    self.mutationLabel.numberOfLines = 0;
    [self.view addSubview:self.mutationLabel];
    [self.mutationLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(LearnWeekly.reuseRenewal.allCarbonYet);
        make.left.mas_equalTo(LearnWeekly.reuseRenewal.catDropWaist);
        make.right.mas_equalTo(-LearnWeekly.reuseRenewal.catDropWaist);
    }];
    
    
    self.moleBoxQueueTextField = [LearnWeekly userCarriageTeethDomainPrecisionAccount];
    self.moleBoxQueueTextField.enabled = NO;
    self.moleBoxQueueTextField.text = self.askButTower[LearnWeekly.reuseRenewal.putPrimeOwnName];
    [self comparedSurgeWasItsReversesMasterView:self.moleBoxQueueTextField text:LearnWeekly.estonianBanner.shotJustQueueHexRun];
    [self.view addSubview:self.moleBoxQueueTextField];
    [self.moleBoxQueueTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.mutationLabel.mas_bottom).offset(LearnWeekly.reuseRenewal.alwaysFarHis);
        make.left.mas_equalTo(LearnWeekly.reuseRenewal.browseStable);
        make.right.mas_equalTo(-LearnWeekly.reuseRenewal.browseStable);
        make.height.mas_equalTo(LearnWeekly.reuseRenewal.rawAdverbArt);
    }];
    
    
    self.defineTornadoTextField = [LearnWeekly userCarriageTeethDomainPrecisionAccount];
    self.defineTornadoTextField.enabled = NO;
    self.defineTornadoTextField.text = self.askButTower[LearnWeekly.reuseRenewal.fullFacePanKey];
    [self comparedSurgeWasItsReversesMasterView:self.defineTornadoTextField text:LearnWeekly.estonianBanner.pathTwoTrustDutchReactor];
    [self.view addSubview:self.defineTornadoTextField];
    [self.defineTornadoTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.moleBoxQueueTextField.mas_bottom).offset(LearnWeekly.reuseRenewal.alwaysFarHis);
        make.left.right.equalTo(self.moleBoxQueueTextField);
        make.height.mas_equalTo(LearnWeekly.reuseRenewal.rawAdverbArt);
    }];
    
    
    UIButton *useShrinkButton = [LearnWeekly uploadedNicknameCancelingLibraryPurpleColor:LearnWeekly.estonianBanner.letterArtRedefinedConfigureCreation];
    [useShrinkButton addTarget:self action:@selector(funCopticSodiumOffsetEarAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:useShrinkButton];
    [useShrinkButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.defineTornadoTextField.mas_bottom).offset(LearnWeekly.reuseRenewal.alwaysFarHis);
        make.left.right.equalTo(self.defineTornadoTextField);
        make.height.mas_equalTo(LearnWeekly.reuseRenewal.notDriveFail);
    }];
    
    
    self.sendBodyPutButton = [LearnWeekly obtainAnswerSourcesDetachFourth:LearnWeekly.estonianBanner.stripCheckingStepIgnoreSayKazakh];
    [self.sendBodyPutButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.sendBodyPutButton addTarget:self action:@selector(executingSignerVisitWasLoadAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.sendBodyPutButton];
    [self.sendBodyPutButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(useShrinkButton.mas_bottom).offset(LearnWeekly.reuseRenewal.cyclingZone);
        make.centerX.equalTo(self.view);
    }];
}

- (void)comparedSurgeWasItsReversesMasterView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(LearnWeekly.reuseRenewal.notDriveFail, LearnWeekly.reuseRenewal.rawAdverbArt)};
    UILabel *hundreds = [[UILabel alloc] initWithFrame:frame];
    hundreds.text = text;
    hundreds.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = hundreds;
}

- (void)executingSignerVisitWasLoadAction:(UIButton *)sender {
    [[HockeySeeManager shared] structureLimitedLargeBuddhistEphemeralForceViewController:self.navigationController];
}

- (void)funCopticSodiumOffsetEarAction:(UIButton *)sender {
    sender.hidden = YES;
    self.mutationLabel.hidden = YES;
    self.serializeView.hidden = NO;
    self.manganeseView.hidden = NO;
    self.sendBodyPutButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(LearnWeekly.reuseRenewal.reviewArmpitBeenTurkmenChecksumWidth, LearnWeekly.reuseRenewal.bitmapShareDailyProvidingYouMargin-LearnWeekly.reuseRenewal.fatExpectDue));
    }];
    [self.moleBoxQueueTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.serializeView.mas_bottom).offset(LearnWeekly.reuseRenewal.alwaysFarHis);
    }];
    [self.view layoutIfNeeded];
    
    BOOL drive = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:LearnWeekly.reuseRenewal.menEachAllRegularReadoutMeasuredLast];
    if (!drive) {
        self.halfSixOwnButton.hidden = NO;
        [ArtAlertView latencySawBlindingRankedPolarMean:nil message:LearnWeekly.estonianBanner.fullThatShipmentLaunchingPortion completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= LearnWeekly.reuseRenewal.looseUsedFor;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:badmintonPubExpectsCarPanObscured:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image badmintonPubExpectsCarPanObscured:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[HockeySeeManager shared] structureLimitedLargeBuddhistEphemeralForceViewController:self.navigationController];
        [HisToast busPage:LearnWeekly.estonianBanner.stoppedKitIndoorProcessesPush];
    }else {
        self.halfSixOwnButton.hidden = NO;
        [ArtAlertView latencySawBlindingRankedPolarMean:nil message:LearnWeekly.estonianBanner.fullThatShipmentLaunchingPortion completion:nil];
    }
}

@end
