






#import "JustBarHisPanViewController.h"
#import "SexToast.h"
#import "YetAskInfo.h"

@interface JustBarHisPanViewController ()

@property (nonatomic, strong) UIImageView *widthSentView;
@property (nonatomic, strong) UIButton *tryRedMusicButton;
@property (nonatomic, strong) UIView *anonymousView;
@property (nonatomic, strong) UILabel *flexibleLabel;
@property (nonatomic, strong) UITextField *literNextOptTextField;
@property (nonatomic, strong) UITextField *detectorLiterTextField;
@end

@implementation JustBarHisPanViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.genreFinalButton.hidden = YES;
    
    if ([YetAskInfo ownPrimarySwipeTheSemanticsImage]) {
        self.widthSentView = [[UIImageView alloc] initWithImage:[YetAskInfo ownPrimarySwipeTheSemanticsImage]];
        [self.view addSubview:self.widthSentView];
        self.widthSentView.hidden = YES;
        [self.widthSentView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(CutEightLow.licenseSmart.mouthRearThe);
            make.left.equalTo(self.reversingButton.mas_right);
            make.top.equalTo(self.view).offset(CutEightLow.licenseSmart.trackPermute);
        }];
    }
    
    self.anonymousView = [CutEightLow anonymousView];
    self.anonymousView.hidden = YES;
    [self.view addSubview:self.anonymousView];
    [self.anonymousView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([YetAskInfo ownPrimarySwipeTheSemanticsImage]) {
            make.centerY.equalTo(self.widthSentView);
            make.left.equalTo(self.widthSentView.mas_right).offset(CutEightLow.licenseSmart.buddyTarget);
        }else {
            make.top.equalTo(self.view).offset(CutEightLow.licenseSmart.trackPermute);
            make.left.equalTo(self.reversingButton.mas_right).offset(CutEightLow.licenseSmart.buddyTarget);
        }
        make.right.equalTo(self.genreFinalButton.mas_left);
        make.height.mas_equalTo(CutEightLow.licenseSmart.mouthRearThe);
    }];
    
    self.flexibleLabel = [CutEightLow bikeDenyPointersNiacinDaily:CutEightLow.mailRetDropSee.issueDeltaAllocatedStorylineStack];
    self.flexibleLabel.numberOfLines = 0;
    [self.view addSubview:self.flexibleLabel];
    [self.flexibleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(CutEightLow.licenseSmart.menBoxFuture);
        make.left.mas_equalTo(CutEightLow.licenseSmart.hexWristPath);
        make.right.mas_equalTo(-CutEightLow.licenseSmart.hexWristPath);
    }];
    
    
    self.literNextOptTextField = [CutEightLow detectionPipeLocalizesSpanishLawAccount];
    self.literNextOptTextField.enabled = NO;
    self.literNextOptTextField.text = self.inferOddCut[CutEightLow.licenseSmart.artMinClampName];
    [self armSayLearnAppearsSevenHashView:self.literNextOptTextField text:CutEightLow.mailRetDropSee.polishQuitCurlContainedSub];
    [self.view addSubview:self.literNextOptTextField];
    [self.literNextOptTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.flexibleLabel.mas_bottom).offset(CutEightLow.licenseSmart.variablesZip);
        make.left.mas_equalTo(CutEightLow.licenseSmart.lappishSplit);
        make.right.mas_equalTo(-CutEightLow.licenseSmart.lappishSplit);
        make.height.mas_equalTo(CutEightLow.licenseSmart.forRetainMap);
    }];
    
    
    self.detectorLiterTextField = [CutEightLow detectionPipeLocalizesSpanishLawAccount];
    self.detectorLiterTextField.enabled = NO;
    self.detectorLiterTextField.text = self.inferOddCut[CutEightLow.licenseSmart.spanLexiconKey];
    [self armSayLearnAppearsSevenHashView:self.detectorLiterTextField text:CutEightLow.mailRetDropSee.fourthMonitoredMusicRouterGiven];
    [self.view addSubview:self.detectorLiterTextField];
    [self.detectorLiterTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.literNextOptTextField.mas_bottom).offset(CutEightLow.licenseSmart.variablesZip);
        make.left.right.equalTo(self.literNextOptTextField);
        make.height.mas_equalTo(CutEightLow.licenseSmart.forRetainMap);
    }];
    
    
    UIButton *duePacketButton = [CutEightLow deliveredSecurelyCanClampCenterColor:CutEightLow.mailRetDropSee.moduleTooEstonianPerformsCache];
    [duePacketButton addTarget:self action:@selector(expectCommandTrashPictureConvertAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:duePacketButton];
    [duePacketButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.detectorLiterTextField.mas_bottom).offset(CutEightLow.licenseSmart.variablesZip);
        make.left.right.equalTo(self.detectorLiterTextField);
        make.height.mas_equalTo(CutEightLow.licenseSmart.mouthRearThe);
    }];
    
    
    self.tryRedMusicButton = [CutEightLow hasUsabilityEngineSampleReadable:CutEightLow.mailRetDropSee.civilHoverTryReceivingOutputRefused];
    [self.tryRedMusicButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.tryRedMusicButton addTarget:self action:@selector(lawIterativeCubeWatchNotAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.tryRedMusicButton];
    [self.tryRedMusicButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(duePacketButton.mas_bottom).offset(CutEightLow.licenseSmart.mapFeetCrop);
        make.centerX.equalTo(self.view);
    }];
}

- (void)armSayLearnAppearsSevenHashView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(CutEightLow.licenseSmart.mouthRearThe, CutEightLow.licenseSmart.forRetainMap)};
    UILabel *mayClick = [[UILabel alloc] initWithFrame:frame];
    mayClick.text = text;
    mayClick.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = mayClick;
}

- (void)lawIterativeCubeWatchNotAction:(UIButton *)sender {
    [[UplinkDryManager shared] pronounBendLambdaCurrentlyProximityExistViewController:self.navigationController];
}

- (void)expectCommandTrashPictureConvertAction:(UIButton *)sender {
    sender.hidden = YES;
    self.flexibleLabel.hidden = YES;
    self.anonymousView.hidden = NO;
    self.widthSentView.hidden = NO;
    self.tryRedMusicButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(CutEightLow.licenseSmart.peoplePluralInviteHomepageCupWidth, CutEightLow.licenseSmart.sessionCountRenewingBagSizeCat-CutEightLow.licenseSmart.flashEyeBank));
    }];
    [self.literNextOptTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.anonymousView.mas_bottom).offset(CutEightLow.licenseSmart.variablesZip);
    }];
    [self.view layoutIfNeeded];
    
    BOOL burst = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:CutEightLow.licenseSmart.distinctCenteringPrintableCapturingParameterEqualityOne];
    if (!burst) {
        self.genreFinalButton.hidden = NO;
        [EggAlertView formThemeBoostChunkyShowersQueue:nil message:CutEightLow.mailRetDropSee.decoderInviteIllBevelPrepare completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= CutEightLow.licenseSmart.runFoundBest;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:cleanTorqueExposurePrimeDeleteNear:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image cleanTorqueExposurePrimeDeleteNear:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[UplinkDryManager shared] pronounBendLambdaCurrentlyProximityExistViewController:self.navigationController];
        [SexToast factAdd:CutEightLow.mailRetDropSee.queryingPopRegionsCatalystConflict];
    }else {
        self.genreFinalButton.hidden = NO;
        [EggAlertView formThemeBoostChunkyShowersQueue:nil message:CutEightLow.mailRetDropSee.decoderInviteIllBevelPrepare completion:nil];
    }
}

@end
