






#import "RenderProvideViewController.h"
#import "TenToast.h"
#import "ForbidInfo.h"

@interface RenderProvideViewController ()

@property (nonatomic, strong) UIImageView *stripSoloView;
@property (nonatomic, strong) UIButton *lastBeaconsButton;
@property (nonatomic, strong) UIView *wonLaunchView;
@property (nonatomic, strong) UILabel *youDolbyLabel;
@property (nonatomic, strong) UITextField *handshakeBedTextField;
@property (nonatomic, strong) UITextField *placeAirShelfTextField;
@end

@implementation RenderProvideViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.howPlusOldButton.hidden = YES;
    
    if ([ForbidInfo commentVariableMenHowArtImage]) {
        self.stripSoloView = [[UIImageView alloc] initWithImage:[ForbidInfo commentVariableMenHowArtImage]];
        [self.view addSubview:self.stripSoloView];
        self.stripSoloView.hidden = YES;
        [self.stripSoloView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(BadgeSunIcy.greekBlueArt.pintBitError);
            make.left.equalTo(self.annotatedButton.mas_right);
            make.top.equalTo(self.view).offset(BadgeSunIcy.greekBlueArt.ornamentShow);
        }];
    }
    
    self.wonLaunchView = [BadgeSunIcy wonLaunchView];
    self.wonLaunchView.hidden = YES;
    [self.view addSubview:self.wonLaunchView];
    [self.wonLaunchView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([ForbidInfo commentVariableMenHowArtImage]) {
            make.centerY.equalTo(self.stripSoloView);
            make.left.equalTo(self.stripSoloView.mas_right).offset(BadgeSunIcy.greekBlueArt.introAnyOut);
        }else {
            make.top.equalTo(self.view).offset(BadgeSunIcy.greekBlueArt.ornamentShow);
            make.left.equalTo(self.annotatedButton.mas_right).offset(BadgeSunIcy.greekBlueArt.introAnyOut);
        }
        make.right.equalTo(self.howPlusOldButton.mas_left);
        make.height.mas_equalTo(BadgeSunIcy.greekBlueArt.pintBitError);
    }];
    
    self.youDolbyLabel = [BadgeSunIcy detectionRangingReadyDryMajor:BadgeSunIcy.lastCaretReply.receiptRotationFormatInlandLossy];
    self.youDolbyLabel.numberOfLines = 0;
    [self.view addSubview:self.youDolbyLabel];
    [self.youDolbyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BadgeSunIcy.greekBlueArt.eventGreater);
        make.left.mas_equalTo(BadgeSunIcy.greekBlueArt.echoSobAxial);
        make.right.mas_equalTo(-BadgeSunIcy.greekBlueArt.echoSobAxial);
    }];
    
    
    self.handshakeBedTextField = [BadgeSunIcy mixTelephonyCanadianServiceUrgentAccount];
    self.handshakeBedTextField.enabled = NO;
    self.handshakeBedTextField.text = self.barsPubLink[BadgeSunIcy.greekBlueArt.tooSkinSendName];
    [self protectedWriteReplacedTriggersNameBandView:self.handshakeBedTextField text:BadgeSunIcy.lastCaretReply.alphabetIcyDeveloperThePolar];
    [self.view addSubview:self.handshakeBedTextField];
    [self.handshakeBedTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.youDolbyLabel.mas_bottom).offset(BadgeSunIcy.greekBlueArt.groupedMolar);
        make.left.mas_equalTo(BadgeSunIcy.greekBlueArt.restoresCity);
        make.right.mas_equalTo(-BadgeSunIcy.greekBlueArt.restoresCity);
        make.height.mas_equalTo(BadgeSunIcy.greekBlueArt.muteEmailTab);
    }];
    
    
    self.placeAirShelfTextField = [BadgeSunIcy mixTelephonyCanadianServiceUrgentAccount];
    self.placeAirShelfTextField.enabled = NO;
    self.placeAirShelfTextField.text = self.barsPubLink[BadgeSunIcy.greekBlueArt.featOneOnlyKey];
    [self protectedWriteReplacedTriggersNameBandView:self.placeAirShelfTextField text:BadgeSunIcy.lastCaretReply.restoreRedoNameStreamedTrap];
    [self.view addSubview:self.placeAirShelfTextField];
    [self.placeAirShelfTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.handshakeBedTextField.mas_bottom).offset(BadgeSunIcy.greekBlueArt.groupedMolar);
        make.left.right.equalTo(self.handshakeBedTextField);
        make.height.mas_equalTo(BadgeSunIcy.greekBlueArt.muteEmailTab);
    }];
    
    
    UIButton *rankArrowButton = [BadgeSunIcy birthConductorWeekendDirectoryExtensionColor:BadgeSunIcy.lastCaretReply.addressLiterNowBounceSuperiors];
    [rankArrowButton addTarget:self action:@selector(methodRussianPickerBufferingAscendedAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:rankArrowButton];
    [rankArrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.placeAirShelfTextField.mas_bottom).offset(BadgeSunIcy.greekBlueArt.groupedMolar);
        make.left.right.equalTo(self.placeAirShelfTextField);
        make.height.mas_equalTo(BadgeSunIcy.greekBlueArt.pintBitError);
    }];
    
    
    self.lastBeaconsButton = [BadgeSunIcy raceProblemUploadPlaybackFolder:BadgeSunIcy.lastCaretReply.ephemeralFiveWorkoutsSuggestedMinFavorites];
    [self.lastBeaconsButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.lastBeaconsButton addTarget:self action:@selector(arabicRegisterClampedDebuggingDigitAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.lastBeaconsButton];
    [self.lastBeaconsButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(rankArrowButton.mas_bottom).offset(BadgeSunIcy.greekBlueArt.midBoxPhase);
        make.centerX.equalTo(self.view);
    }];
}

- (void)protectedWriteReplacedTriggersNameBandView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(BadgeSunIcy.greekBlueArt.pintBitError, BadgeSunIcy.greekBlueArt.muteEmailTab)};
    UILabel *nowReply = [[UILabel alloc] initWithFrame:frame];
    nowReply.text = text;
    nowReply.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = nowReply;
}

- (void)arabicRegisterClampedDebuggingDigitAction:(UIButton *)sender {
    [[FixObjectManager shared] extendsBlendNoteNumeratorLimitPagerViewController:self.navigationController];
}

- (void)methodRussianPickerBufferingAscendedAction:(UIButton *)sender {
    sender.hidden = YES;
    self.youDolbyLabel.hidden = YES;
    self.wonLaunchView.hidden = NO;
    self.stripSoloView.hidden = NO;
    self.lastBeaconsButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(BadgeSunIcy.greekBlueArt.helperInactiveThreadPrimaryExtentWidth, BadgeSunIcy.greekBlueArt.packetUploadingDownhillResolvedDispatchSecurity-BadgeSunIcy.greekBlueArt.talkCountSub));
    }];
    [self.handshakeBedTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.wonLaunchView.mas_bottom).offset(BadgeSunIcy.greekBlueArt.groupedMolar);
    }];
    [self.view layoutIfNeeded];
    
    BOOL total = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:BadgeSunIcy.greekBlueArt.focusFurlongsDeprecateEnablingAdjustShelfMajor];
    if (!total) {
        self.howPlusOldButton.hidden = NO;
        [TagAlertView schoolSerbianIllInstallsMagentaToo:nil message:BadgeSunIcy.lastCaretReply.entryPascalBinAppendBlink completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= BadgeSunIcy.greekBlueArt.paceWorldOdd;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:tapAliveKindWarningEyeReflect:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image tapAliveKindWarningEyeReflect:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[FixObjectManager shared] extendsBlendNoteNumeratorLimitPagerViewController:self.navigationController];
        [TenToast flights:BadgeSunIcy.lastCaretReply.oldestEscapesSpineResignBookmark];
    }else {
        self.howPlusOldButton.hidden = NO;
        [TagAlertView schoolSerbianIllInstallsMagentaToo:nil message:BadgeSunIcy.lastCaretReply.entryPascalBinAppendBlink completion:nil];
    }
}

@end
