






#import "SayFileForTabViewController.h"
#import "SinToast.h"
#import "SenderInfo.h"

@interface SayFileForTabViewController ()

@property (nonatomic, strong) UIImageView *kindQuoteView;
@property (nonatomic, strong) UIButton *howNetscapeButton;
@property (nonatomic, strong) UIView *unlimitedView;
@property (nonatomic, strong) UILabel *sinRebusLabel;
@property (nonatomic, strong) UITextField *forCenteringTextField;
@property (nonatomic, strong) UITextField *tempHomePieceTextField;
@end

@implementation SayFileForTabViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.sendPinUseButton.hidden = YES;
    
    if ([SenderInfo clipStairOriginsAssertLibraryImage]) {
        self.kindQuoteView = [[UIImageView alloc] initWithImage:[SenderInfo clipStairOriginsAssertLibraryImage]];
        [self.view addSubview:self.kindQuoteView];
        self.kindQuoteView.hidden = YES;
        [self.kindQuoteView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(TooCloudSun.seeFocusSlab.ditherWhoBar);
            make.left.equalTo(self.retRetainButton.mas_right);
            make.top.equalTo(self.view).offset(TooCloudSun.seeFocusSlab.inuitSideDry);
        }];
    }
    
    self.unlimitedView = [TooCloudSun unlimitedView];
    self.unlimitedView.hidden = YES;
    [self.view addSubview:self.unlimitedView];
    [self.unlimitedView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([SenderInfo clipStairOriginsAssertLibraryImage]) {
            make.centerY.equalTo(self.kindQuoteView);
            make.left.equalTo(self.kindQuoteView.mas_right).offset(TooCloudSun.seeFocusSlab.tagsRefresh);
        }else {
            make.top.equalTo(self.view).offset(TooCloudSun.seeFocusSlab.inuitSideDry);
            make.left.equalTo(self.retRetainButton.mas_right).offset(TooCloudSun.seeFocusSlab.tagsRefresh);
        }
        make.right.equalTo(self.sendPinUseButton.mas_left);
        make.height.mas_equalTo(TooCloudSun.seeFocusSlab.ditherWhoBar);
    }];
    
    self.sinRebusLabel = [TooCloudSun saveReceivedSmallestBasicTrigger:TooCloudSun.methodCaseItem.ouncesYardShakeAmbientOrdinary];
    self.sinRebusLabel.numberOfLines = 0;
    [self.view addSubview:self.sinRebusLabel];
    [self.sinRebusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(TooCloudSun.seeFocusSlab.inlandReview);
        make.left.mas_equalTo(TooCloudSun.seeFocusSlab.valuePingCap);
        make.right.mas_equalTo(-TooCloudSun.seeFocusSlab.valuePingCap);
    }];
    
    
    self.forCenteringTextField = [TooCloudSun optionBannerHexChainDidAccount];
    self.forCenteringTextField.enabled = NO;
    self.forCenteringTextField.text = self.tablePanFor[TooCloudSun.seeFocusSlab.poolAskBurnName];
    [self softUnderageContactMarkPresenceKitView:self.forCenteringTextField text:TooCloudSun.methodCaseItem.pubKirghizLanguagesQuotationAchieved];
    [self.view addSubview:self.forCenteringTextField];
    [self.forCenteringTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.sinRebusLabel.mas_bottom).offset(TooCloudSun.seeFocusSlab.mediumDetail);
        make.left.mas_equalTo(TooCloudSun.seeFocusSlab.addAggregate);
        make.right.mas_equalTo(-TooCloudSun.seeFocusSlab.addAggregate);
        make.height.mas_equalTo(TooCloudSun.seeFocusSlab.plugTraitTwo);
    }];
    
    
    self.tempHomePieceTextField = [TooCloudSun optionBannerHexChainDidAccount];
    self.tempHomePieceTextField.enabled = NO;
    self.tempHomePieceTextField.text = self.tablePanFor[TooCloudSun.seeFocusSlab.meterSexRetKey];
    [self softUnderageContactMarkPresenceKitView:self.tempHomePieceTextField text:TooCloudSun.methodCaseItem.shearReceiptDarwinDownBetter];
    [self.view addSubview:self.tempHomePieceTextField];
    [self.tempHomePieceTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.forCenteringTextField.mas_bottom).offset(TooCloudSun.seeFocusSlab.mediumDetail);
        make.left.right.equalTo(self.forCenteringTextField);
        make.height.mas_equalTo(TooCloudSun.seeFocusSlab.plugTraitTwo);
    }];
    
    
    UIButton *frontPingButton = [TooCloudSun mouthExtentsLettishSquaresMonotonicColor:TooCloudSun.methodCaseItem.cutTaskReactorUighurSlashes];
    [frontPingButton addTarget:self action:@selector(rollbackBendMemoryDolbyBusyAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:frontPingButton];
    [frontPingButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.tempHomePieceTextField.mas_bottom).offset(TooCloudSun.seeFocusSlab.mediumDetail);
        make.left.right.equalTo(self.tempHomePieceTextField);
        make.height.mas_equalTo(TooCloudSun.seeFocusSlab.ditherWhoBar);
    }];
    
    
    self.howNetscapeButton = [TooCloudSun acquireMixerModifiedModeSafety:TooCloudSun.methodCaseItem.cyclingJobErrorCheckedPartnerNotified];
    [self.howNetscapeButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.howNetscapeButton addTarget:self action:@selector(collapseBigQuitThumbnailRetrieveAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.howNetscapeButton];
    [self.howNetscapeButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(frontPingButton.mas_bottom).offset(TooCloudSun.seeFocusSlab.playingFlow);
        make.centerX.equalTo(self.view);
    }];
}

- (void)softUnderageContactMarkPresenceKitView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(TooCloudSun.seeFocusSlab.ditherWhoBar, TooCloudSun.seeFocusSlab.plugTraitTwo)};
    UILabel *minorEgg = [[UILabel alloc] initWithFrame:frame];
    minorEgg.text = text;
    minorEgg.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = minorEgg;
}

- (void)collapseBigQuitThumbnailRetrieveAction:(UIButton *)sender {
    [[DocumentsManager shared] acceptSiteKirghizNetSubSampleViewController:self.navigationController];
}

- (void)rollbackBendMemoryDolbyBusyAction:(UIButton *)sender {
    sender.hidden = YES;
    self.sinRebusLabel.hidden = YES;
    self.unlimitedView.hidden = NO;
    self.kindQuoteView.hidden = NO;
    self.howNetscapeButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(TooCloudSun.seeFocusSlab.bookmarkUtilitiesResolvedUnlockedHaveWidth, TooCloudSun.seeFocusSlab.integrateDarwinScrollingLetterMarkEnabling-TooCloudSun.seeFocusSlab.busBitsDaily));
    }];
    [self.forCenteringTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.unlimitedView.mas_bottom).offset(TooCloudSun.seeFocusSlab.mediumDetail);
    }];
    [self.view layoutIfNeeded];
    
    BOOL serif = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:TooCloudSun.seeFocusSlab.transmitAttributeScatteredHelpersLevelArbiterFull];
    if (!serif) {
        self.sendPinUseButton.hidden = NO;
        [HowAlertView cupTheBagPeriodIntersectUnified:nil message:TooCloudSun.methodCaseItem.recoveryShutdownNumeratorThirteenExponent completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= TooCloudSun.seeFocusSlab.permanentRed;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:particleLossyGrowRevisionsScanConductor:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image particleLossyGrowRevisionsScanConductor:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[DocumentsManager shared] acceptSiteKirghizNetSubSampleViewController:self.navigationController];
        [SinToast hisNear:TooCloudSun.methodCaseItem.intensityLevelDetailsLogoVolatile];
    }else {
        self.sendPinUseButton.hidden = NO;
        [HowAlertView cupTheBagPeriodIntersectUnified:nil message:TooCloudSun.methodCaseItem.recoveryShutdownNumeratorThirteenExponent completion:nil];
    }
}

@end
