






#import "DisplayStreamViewController.h"
#import "CutToast.h"
#import "SimpleInfo.h"

@interface DisplayStreamViewController ()

@property (nonatomic, strong) UIImageView *sindhiPutView;
@property (nonatomic, strong) UIButton *sunAgeShortButton;
@property (nonatomic, strong) UIView *deferringView;
@property (nonatomic, strong) UILabel *penDanceLabel;
@property (nonatomic, strong) UITextField *opticalTildeTextField;
@property (nonatomic, strong) UITextField *clangSlabBikeTextField;
@end

@implementation DisplayStreamViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.openCatArmButton.hidden = YES;
    
    if ([SimpleInfo keepEventZeroSolveFullyImage]) {
        self.sindhiPutView = [[UIImageView alloc] initWithImage:[SimpleInfo keepEventZeroSolveFullyImage]];
        [self.view addSubview:self.sindhiPutView];
        self.sindhiPutView.hidden = YES;
        [self.sindhiPutView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(BinTopLemma.drainCatFair.clipSeeBegin);
            make.left.equalTo(self.somaliSeeButton.mas_right);
            make.top.equalTo(self.view).offset(BinTopLemma.drainCatFair.closeUserNot);
        }];
    }
    
    self.deferringView = [BinTopLemma deferringView];
    self.deferringView.hidden = YES;
    [self.view addSubview:self.deferringView];
    [self.deferringView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([SimpleInfo keepEventZeroSolveFullyImage]) {
            make.centerY.equalTo(self.sindhiPutView);
            make.left.equalTo(self.sindhiPutView.mas_right).offset(BinTopLemma.drainCatFair.danceBetter);
        }else {
            make.top.equalTo(self.view).offset(BinTopLemma.drainCatFair.closeUserNot);
            make.left.equalTo(self.somaliSeeButton.mas_right).offset(BinTopLemma.drainCatFair.danceBetter);
        }
        make.right.equalTo(self.openCatArmButton.mas_left);
        make.height.mas_equalTo(BinTopLemma.drainCatFair.clipSeeBegin);
    }];
    
    self.penDanceLabel = [BinTopLemma wasCentralsSharingFunPrompt:BinTopLemma.oldHitDownIron.ukrainianAgeDrivenMinShuffle];
    self.penDanceLabel.numberOfLines = 0;
    [self.view addSubview:self.penDanceLabel];
    [self.penDanceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BinTopLemma.drainCatFair.awayOverride);
        make.left.mas_equalTo(BinTopLemma.drainCatFair.nameAdvances);
        make.right.mas_equalTo(-BinTopLemma.drainCatFair.nameAdvances);
    }];
    
    
    self.opticalTildeTextField = [BinTopLemma drizzleThresholdHelperRedLargerAccount];
    self.opticalTildeTextField.enabled = NO;
    self.opticalTildeTextField.text = self.boldInfoTip[BinTopLemma.drainCatFair.askAllLabelName];
    [self softballFactoryShearBorderedManualLeaseView:self.opticalTildeTextField text:BinTopLemma.oldHitDownIron.obscuresPlaceAttributeKeyboardWeekend];
    [self.view addSubview:self.opticalTildeTextField];
    [self.opticalTildeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.penDanceLabel.mas_bottom).offset(BinTopLemma.drainCatFair.chestDryLost);
        make.left.mas_equalTo(BinTopLemma.drainCatFair.ownPedometer);
        make.right.mas_equalTo(-BinTopLemma.drainCatFair.ownPedometer);
        make.height.mas_equalTo(BinTopLemma.drainCatFair.outerMaximum);
    }];
    
    
    self.clangSlabBikeTextField = [BinTopLemma drizzleThresholdHelperRedLargerAccount];
    self.clangSlabBikeTextField.enabled = NO;
    self.clangSlabBikeTextField.text = self.boldInfoTip[BinTopLemma.drainCatFair.wayRecoveryKey];
    [self softballFactoryShearBorderedManualLeaseView:self.clangSlabBikeTextField text:BinTopLemma.oldHitDownIron.promotionUploadedWordEqualityKilograms];
    [self.view addSubview:self.clangSlabBikeTextField];
    [self.clangSlabBikeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.opticalTildeTextField.mas_bottom).offset(BinTopLemma.drainCatFair.chestDryLost);
        make.left.right.equalTo(self.opticalTildeTextField);
        make.height.mas_equalTo(BinTopLemma.drainCatFair.outerMaximum);
    }];
    
    
    UIButton *meterForkButton = [BinTopLemma tipSwahiliOutletTailCurrentlyColor:BinTopLemma.oldHitDownIron.gatherSignalEntityHourlyBulgarian];
    [meterForkButton addTarget:self action:@selector(preservesBlusterySeeChunkMotionAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:meterForkButton];
    [meterForkButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.clangSlabBikeTextField.mas_bottom).offset(BinTopLemma.drainCatFair.chestDryLost);
        make.left.right.equalTo(self.clangSlabBikeTextField);
        make.height.mas_equalTo(BinTopLemma.drainCatFair.clipSeeBegin);
    }];
    
    
    self.sunAgeShortButton = [BinTopLemma finnishTerminatePartThreadCopyright:BinTopLemma.oldHitDownIron.largestSexLeftMostCurrentlyMicro];
    [self.sunAgeShortButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.sunAgeShortButton addTarget:self action:@selector(rangingBarsSensorCheckedCollapseAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.sunAgeShortButton];
    [self.sunAgeShortButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(meterForkButton.mas_bottom).offset(BinTopLemma.drainCatFair.affectedCut);
        make.centerX.equalTo(self.view);
    }];
}

- (void)softballFactoryShearBorderedManualLeaseView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(BinTopLemma.drainCatFair.clipSeeBegin, BinTopLemma.drainCatFair.outerMaximum)};
    UILabel *tagBrief = [[UILabel alloc] initWithFrame:frame];
    tagBrief.text = text;
    tagBrief.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = tagBrief;
}

- (void)rangingBarsSensorCheckedCollapseAction:(UIButton *)sender {
    [[ChunkyGetManager shared] schedulerTriggersRequestedGramConcertMovieViewController:self.navigationController];
}

- (void)preservesBlusterySeeChunkMotionAction:(UIButton *)sender {
    sender.hidden = YES;
    self.penDanceLabel.hidden = YES;
    self.deferringView.hidden = NO;
    self.sindhiPutView.hidden = NO;
    self.sunAgeShortButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(BinTopLemma.drainCatFair.extendingOpacityDatabasesHomeCheckWidth, BinTopLemma.drainCatFair.canonicalSpaDryPongPutGenre-BinTopLemma.drainCatFair.producingEar));
    }];
    [self.opticalTildeTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.deferringView.mas_bottom).offset(BinTopLemma.drainCatFair.chestDryLost);
    }];
    [self.view layoutIfNeeded];
    
    BOOL every = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:BinTopLemma.drainCatFair.insideFlatnessCaffeineMeteringRetrieveFixMillion];
    if (!every) {
        self.openCatArmButton.hidden = NO;
        [NowAlertView prominentGoldenProfilesTropicalPivotViolation:nil message:BinTopLemma.oldHitDownIron.chunkEvaluatedArbitraryDisabledBus completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= BinTopLemma.drainCatFair.impactFiller;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:opaqueFlushLoudPlugSeasonTagalog:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image opaqueFlushLoudPlugSeasonTagalog:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[ChunkyGetManager shared] schedulerTriggersRequestedGramConcertMovieViewController:self.navigationController];
        [CutToast insulin:BinTopLemma.oldHitDownIron.lawLenientDatabasesLeakyStand];
    }else {
        self.openCatArmButton.hidden = NO;
        [NowAlertView prominentGoldenProfilesTropicalPivotViolation:nil message:BinTopLemma.oldHitDownIron.chunkEvaluatedArbitraryDisabledBus completion:nil];
    }
}

@end
