






#import "BusTodaySmallViewController.h"
#import "NotToast.h"
#import "SheTagInfo.h"

@interface BusTodaySmallViewController ()

@property (nonatomic, strong) UIImageView *askSelectView;
@property (nonatomic, strong) UIButton *legacySheetButton;
@property (nonatomic, strong) UIView *siteThumbView;
@property (nonatomic, strong) UILabel *songLostLabel;
@property (nonatomic, strong) UITextField *variableWakeTextField;
@property (nonatomic, strong) UITextField *zoomRecognizeTextField;
@end

@implementation BusTodaySmallViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.logAddTintButton.hidden = YES;
    
    if ([SheTagInfo dublinInviteeTodaySchoolMostImage]) {
        self.askSelectView = [[UIImageView alloc] initWithImage:[SheTagInfo dublinInviteeTodaySchoolMostImage]];
        [self.view addSubview:self.askSelectView];
        self.askSelectView.hidden = YES;
        [self.askSelectView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(PriorEarSee.netListPhoto.pairReceiver);
            make.left.equalTo(self.truncatesButton.mas_right);
            make.top.equalTo(self.view).offset(PriorEarSee.netListPhoto.magicChatWin);
        }];
    }
    
    self.siteThumbView = [PriorEarSee siteThumbView];
    self.siteThumbView.hidden = YES;
    [self.view addSubview:self.siteThumbView];
    [self.siteThumbView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([SheTagInfo dublinInviteeTodaySchoolMostImage]) {
            make.centerY.equalTo(self.askSelectView);
            make.left.equalTo(self.askSelectView.mas_right).offset(PriorEarSee.netListPhoto.verticalHer);
        }else {
            make.top.equalTo(self.view).offset(PriorEarSee.netListPhoto.magicChatWin);
            make.left.equalTo(self.truncatesButton.mas_right).offset(PriorEarSee.netListPhoto.verticalHer);
        }
        make.right.equalTo(self.logAddTintButton.mas_left);
        make.height.mas_equalTo(PriorEarSee.netListPhoto.pairReceiver);
    }];
    
    self.songLostLabel = [PriorEarSee calciumPublisherSourceOpacityCompany:PriorEarSee.drawCreditLeft.dirtyFullDeepCandidateCorrupt];
    self.songLostLabel.numberOfLines = 0;
    [self.view addSubview:self.songLostLabel];
    [self.songLostLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PriorEarSee.netListPhoto.bandPanAcute);
        make.left.mas_equalTo(PriorEarSee.netListPhoto.hintRetTrait);
        make.right.mas_equalTo(-PriorEarSee.netListPhoto.hintRetTrait);
    }];
    
    
    self.variableWakeTextField = [PriorEarSee capSunRemembersClampingStrongestAccount];
    self.variableWakeTextField.enabled = NO;
    self.variableWakeTextField.text = self.theBuddyAge[PriorEarSee.netListPhoto.binBridgingName];
    [self aboutDelayBagOptNineSpaceView:self.variableWakeTextField text:PriorEarSee.drawCreditLeft.givenCorrectedTruncatedAccountsMiles];
    [self.view addSubview:self.variableWakeTextField];
    [self.variableWakeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.songLostLabel.mas_bottom).offset(PriorEarSee.netListPhoto.needWasMonth);
        make.left.mas_equalTo(PriorEarSee.netListPhoto.twoSilentFor);
        make.right.mas_equalTo(-PriorEarSee.netListPhoto.twoSilentFor);
        make.height.mas_equalTo(PriorEarSee.netListPhoto.preciseTrust);
    }];
    
    
    self.zoomRecognizeTextField = [PriorEarSee capSunRemembersClampingStrongestAccount];
    self.zoomRecognizeTextField.enabled = NO;
    self.zoomRecognizeTextField.text = self.theBuddyAge[PriorEarSee.netListPhoto.ampereDailyKey];
    [self aboutDelayBagOptNineSpaceView:self.zoomRecognizeTextField text:PriorEarSee.drawCreditLeft.updatingAnyDispatchFlashConnected];
    [self.view addSubview:self.zoomRecognizeTextField];
    [self.zoomRecognizeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.variableWakeTextField.mas_bottom).offset(PriorEarSee.netListPhoto.needWasMonth);
        make.left.right.equalTo(self.variableWakeTextField);
        make.height.mas_equalTo(PriorEarSee.netListPhoto.preciseTrust);
    }];
    
    
    UIButton *sheExtendButton = [PriorEarSee alignmentBlindingScrollInstancesBuildColor:PriorEarSee.drawCreditLeft.primariesResignPauseIcelandicDevices];
    [sheExtendButton addTarget:self action:@selector(switchSleetAscenderFinalTooAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:sheExtendButton];
    [sheExtendButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.zoomRecognizeTextField.mas_bottom).offset(PriorEarSee.netListPhoto.needWasMonth);
        make.left.right.equalTo(self.zoomRecognizeTextField);
        make.height.mas_equalTo(PriorEarSee.netListPhoto.pairReceiver);
    }];
    
    
    self.legacySheetButton = [PriorEarSee qualityMasterPrecisionMillCause:PriorEarSee.drawCreditLeft.slideMegabitsBusResizingArtSettings];
    [self.legacySheetButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.legacySheetButton addTarget:self action:@selector(featureStandardMalformedWritingPopAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.legacySheetButton];
    [self.legacySheetButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(sheExtendButton.mas_bottom).offset(PriorEarSee.netListPhoto.postcardLaw);
        make.centerX.equalTo(self.view);
    }];
}

- (void)aboutDelayBagOptNineSpaceView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(PriorEarSee.netListPhoto.pairReceiver, PriorEarSee.netListPhoto.preciseTrust)};
    UILabel *equalSon = [[UILabel alloc] initWithFrame:frame];
    equalSon.text = text;
    equalSon.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = equalSon;
}

- (void)featureStandardMalformedWritingPopAction:(UIButton *)sender {
    [[WeekChainManager shared] thirteenPullRequireWaxPutDashViewController:self.navigationController];
}

- (void)switchSleetAscenderFinalTooAction:(UIButton *)sender {
    sender.hidden = YES;
    self.songLostLabel.hidden = YES;
    self.siteThumbView.hidden = NO;
    self.askSelectView.hidden = NO;
    self.legacySheetButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(PriorEarSee.netListPhoto.moreInvitedBezelCopticExcludeWidth, PriorEarSee.netListPhoto.rationalZoomSubscribeUseFiberForce-PriorEarSee.netListPhoto.ownChromaToo));
    }];
    [self.variableWakeTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.siteThumbView.mas_bottom).offset(PriorEarSee.netListPhoto.needWasMonth);
    }];
    [self.view layoutIfNeeded];
    
    BOOL inuit = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:PriorEarSee.netListPhoto.keyOnlyEastUpsideSpringWordRedo];
    if (!inuit) {
        self.logAddTintButton.hidden = NO;
        [WaxAlertView panControlsResonantFarWrestlingObserve:nil message:PriorEarSee.drawCreditLeft.ticketsCardioidPoolValidityCanonical completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= PriorEarSee.netListPhoto.rootAskScene;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:redAtomCompanyDuplexPlugRenew:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image redAtomCompanyDuplexPlugRenew:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[WeekChainManager shared] thirteenPullRequireWaxPutDashViewController:self.navigationController];
        [NotToast farOver:PriorEarSee.drawCreditLeft.rearMealAccurateLargerBar];
    }else {
        self.logAddTintButton.hidden = NO;
        [WaxAlertView panControlsResonantFarWrestlingObserve:nil message:PriorEarSee.drawCreditLeft.ticketsCardioidPoolValidityCanonical completion:nil];
    }
}

@end
