






#import "BookMakerLiftViewController.h"
#import "HowToast.h"
#import "ScriptInfo.h"

@interface BookMakerLiftViewController ()

@property (nonatomic, strong) UIImageView *fontThickView;
@property (nonatomic, strong) UIButton *endIcyPauseButton;
@property (nonatomic, strong) UIView *icyBackupView;
@property (nonatomic, strong) UILabel *oddAloneLabel;
@property (nonatomic, strong) UITextField *putWatchMoveTextField;
@property (nonatomic, strong) UITextField *eastBasicLostTextField;
@end

@implementation BookMakerLiftViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.innerDelayButton.hidden = YES;
    
    if ([ScriptInfo surrogateBinFooterFetchedLevelImage]) {
        self.fontThickView = [[UIImageView alloc] initWithImage:[ScriptInfo surrogateBinFooterFetchedLevelImage]];
        [self.view addSubview:self.fontThickView];
        self.fontThickView.hidden = YES;
        [self.fontThickView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(ExtentEuler.maleSubtitle.waitMagnetic);
            make.left.equalTo(self.koreanMinButton.mas_right);
            make.top.equalTo(self.view).offset(ExtentEuler.maleSubtitle.sixColumnRed);
        }];
    }
    
    self.icyBackupView = [ExtentEuler icyBackupView];
    self.icyBackupView.hidden = YES;
    [self.view addSubview:self.icyBackupView];
    [self.icyBackupView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([ScriptInfo surrogateBinFooterFetchedLevelImage]) {
            make.centerY.equalTo(self.fontThickView);
            make.left.equalTo(self.fontThickView.mas_right).offset(ExtentEuler.maleSubtitle.binVideoWet);
        }else {
            make.top.equalTo(self.view).offset(ExtentEuler.maleSubtitle.sixColumnRed);
            make.left.equalTo(self.koreanMinButton.mas_right).offset(ExtentEuler.maleSubtitle.binVideoWet);
        }
        make.right.equalTo(self.innerDelayButton.mas_left);
        make.height.mas_equalTo(ExtentEuler.maleSubtitle.waitMagnetic);
    }];
    
    self.oddAloneLabel = [ExtentEuler publisherSoftnessSmartApplyLike:ExtentEuler.cutMaxEntryAny.weeklyIdleVignetteParseImproper];
    self.oddAloneLabel.numberOfLines = 0;
    [self.view addSubview:self.oddAloneLabel];
    [self.oddAloneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ExtentEuler.maleSubtitle.faxMalayOpen);
        make.left.mas_equalTo(ExtentEuler.maleSubtitle.selectorMust);
        make.right.mas_equalTo(-ExtentEuler.maleSubtitle.selectorMust);
    }];
    
    
    self.putWatchMoveTextField = [ExtentEuler malformedRectifiedHaveMayCityAccount];
    self.putWatchMoveTextField.enabled = NO;
    self.putWatchMoveTextField.text = self.tenBoxError[ExtentEuler.maleSubtitle.tagsTapsFixName];
    [self bedMalformedSplitKelvinComplexThreeView:self.putWatchMoveTextField text:ExtentEuler.cutMaxEntryAny.uploadedKashmiriAdvertiseCardSessions];
    [self.view addSubview:self.putWatchMoveTextField];
    [self.putWatchMoveTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.oddAloneLabel.mas_bottom).offset(ExtentEuler.maleSubtitle.printAirline);
        make.left.mas_equalTo(ExtentEuler.maleSubtitle.sharingLater);
        make.right.mas_equalTo(-ExtentEuler.maleSubtitle.sharingLater);
        make.height.mas_equalTo(ExtentEuler.maleSubtitle.noteFloorTap);
    }];
    
    
    self.eastBasicLostTextField = [ExtentEuler malformedRectifiedHaveMayCityAccount];
    self.eastBasicLostTextField.enabled = NO;
    self.eastBasicLostTextField.text = self.tenBoxError[ExtentEuler.maleSubtitle.realmSeeAskKey];
    [self bedMalformedSplitKelvinComplexThreeView:self.eastBasicLostTextField text:ExtentEuler.cutMaxEntryAny.unlimitedInstallEastCubicFiller];
    [self.view addSubview:self.eastBasicLostTextField];
    [self.eastBasicLostTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.putWatchMoveTextField.mas_bottom).offset(ExtentEuler.maleSubtitle.printAirline);
        make.left.right.equalTo(self.putWatchMoveTextField);
        make.height.mas_equalTo(ExtentEuler.maleSubtitle.noteFloorTap);
    }];
    
    
    UIButton *proximityButton = [ExtentEuler slovakSalientKeyArbiterSixColor:ExtentEuler.cutMaxEntryAny.balancedMetabolicMinIdentifySingular];
    [proximityButton addTarget:self action:@selector(exclusiveRoomProblemObsoleteLinearlyAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:proximityButton];
    [proximityButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.eastBasicLostTextField.mas_bottom).offset(ExtentEuler.maleSubtitle.printAirline);
        make.left.right.equalTo(self.eastBasicLostTextField);
        make.height.mas_equalTo(ExtentEuler.maleSubtitle.waitMagnetic);
    }];
    
    
    self.endIcyPauseButton = [ExtentEuler pedometerShortcutsManganeseIntersectAudiences:ExtentEuler.cutMaxEntryAny.returnsOpaqueFarsiPopCloseRespond];
    [self.endIcyPauseButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.endIcyPauseButton addTarget:self action:@selector(ringNumeralPostCycleDogAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.endIcyPauseButton];
    [self.endIcyPauseButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(proximityButton.mas_bottom).offset(ExtentEuler.maleSubtitle.windowsMale);
        make.centerX.equalTo(self.view);
    }];
}

- (void)bedMalformedSplitKelvinComplexThreeView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(ExtentEuler.maleSubtitle.waitMagnetic, ExtentEuler.maleSubtitle.noteFloorTap)};
    UILabel *musicOwn = [[UILabel alloc] initWithFrame:frame];
    musicOwn.text = text;
    musicOwn.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = musicOwn;
}

- (void)ringNumeralPostCycleDogAction:(UIButton *)sender {
    [[FrequencyManager shared] tryTenSwipeHasRelationsRankViewController:self.navigationController];
}

- (void)exclusiveRoomProblemObsoleteLinearlyAction:(UIButton *)sender {
    sender.hidden = YES;
    self.oddAloneLabel.hidden = YES;
    self.icyBackupView.hidden = NO;
    self.fontThickView.hidden = NO;
    self.endIcyPauseButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(ExtentEuler.maleSubtitle.rateGramPickerInvokeProminentWidth, ExtentEuler.maleSubtitle.cupIntentEntropyInfinityPolishTerahertz-ExtentEuler.maleSubtitle.bracketClean));
    }];
    [self.putWatchMoveTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.icyBackupView.mas_bottom).offset(ExtentEuler.maleSubtitle.printAirline);
    }];
    [self.view layoutIfNeeded];
    
    BOOL bayer = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:ExtentEuler.maleSubtitle.stakeLooperKitProximityDoneNumeratorCenter];
    if (!bayer) {
        self.innerDelayButton.hidden = NO;
        [BoxAlertView blueIrishSemaphoreSuccessEstablishHas:nil message:ExtentEuler.cutMaxEntryAny.bayerWatchedSinDatabaseAcute completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= ExtentEuler.maleSubtitle.mouseAllSeek;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:wetSmallerFullBinaryEvictFinnish:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image wetSmallerFullBinaryEvictFinnish:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[FrequencyManager shared] tryTenSwipeHasRelationsRankViewController:self.navigationController];
        [HowToast weekHis:ExtentEuler.cutMaxEntryAny.mismatchFalloffCellParsingShuffle];
    }else {
        self.innerDelayButton.hidden = NO;
        [BoxAlertView blueIrishSemaphoreSuccessEstablishHas:nil message:ExtentEuler.cutMaxEntryAny.bayerWatchedSinDatabaseAcute completion:nil];
    }
}

@end
