






#import "RematchIntentViewController.h"
#import "IcyToast.h"
#import "DogCanInfo.h"

@interface RematchIntentViewController ()

@property (nonatomic, strong) UIImageView *focusJoinView;
@property (nonatomic, strong) UIButton *dueAtomVeryButton;
@property (nonatomic, strong) UIView *hybridBarView;
@property (nonatomic, strong) UILabel *baseThinLabel;
@property (nonatomic, strong) UITextField *cousinGaelicTextField;
@property (nonatomic, strong) UITextField *followPassiveTextField;
@end

@implementation RematchIntentViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.throughRowButton.hidden = YES;
    
    if ([DogCanInfo accurateSafariRemovesProjectBottomImage]) {
        self.focusJoinView = [[UIImageView alloc] initWithImage:[DogCanInfo accurateSafariRemovesProjectBottomImage]];
        [self.view addSubview:self.focusJoinView];
        self.focusJoinView.hidden = YES;
        [self.focusJoinView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(SchemesSong.targetRemote.pingDirtySin);
            make.left.equalTo(self.reuseCallButton.mas_right);
            make.top.equalTo(self.view).offset(SchemesSong.targetRemote.subDecrypted);
        }];
    }
    
    self.hybridBarView = [SchemesSong hybridBarView];
    self.hybridBarView.hidden = YES;
    [self.view addSubview:self.hybridBarView];
    [self.hybridBarView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([DogCanInfo accurateSafariRemovesProjectBottomImage]) {
            make.centerY.equalTo(self.focusJoinView);
            make.left.equalTo(self.focusJoinView.mas_right).offset(SchemesSong.targetRemote.areOutQuiet);
        }else {
            make.top.equalTo(self.view).offset(SchemesSong.targetRemote.subDecrypted);
            make.left.equalTo(self.reuseCallButton.mas_right).offset(SchemesSong.targetRemote.areOutQuiet);
        }
        make.right.equalTo(self.throughRowButton.mas_left);
        make.height.mas_equalTo(SchemesSong.targetRemote.pingDirtySin);
    }];
    
    self.baseThinLabel = [SchemesSong adoptCiphersDueSleetBus:SchemesSong.albumHexAgeFix.overlapStylisticChallengeWidthTerahertz];
    self.baseThinLabel.numberOfLines = 0;
    [self.view addSubview:self.baseThinLabel];
    [self.baseThinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(SchemesSong.targetRemote.finishedLoad);
        make.left.mas_equalTo(SchemesSong.targetRemote.hasHostQuote);
        make.right.mas_equalTo(-SchemesSong.targetRemote.hasHostQuote);
    }];
    
    
    self.cousinGaelicTextField = [SchemesSong integersPredictedOutletLibraryDiastolicAccount];
    self.cousinGaelicTextField.enabled = NO;
    self.cousinGaelicTextField.text = self.minimumLine[SchemesSong.targetRemote.oddHueShortName];
    [self remembersSlidePlayEqualAscendedLazyView:self.cousinGaelicTextField text:SchemesSong.albumHexAgeFix.halfTwentyMarginsModelDeviation];
    [self.view addSubview:self.cousinGaelicTextField];
    [self.cousinGaelicTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.baseThinLabel.mas_bottom).offset(SchemesSong.targetRemote.canonBattery);
        make.left.mas_equalTo(SchemesSong.targetRemote.decodingUndo);
        make.right.mas_equalTo(-SchemesSong.targetRemote.decodingUndo);
        make.height.mas_equalTo(SchemesSong.targetRemote.hasBlurBuddy);
    }];
    
    
    self.followPassiveTextField = [SchemesSong integersPredictedOutletLibraryDiastolicAccount];
    self.followPassiveTextField.enabled = NO;
    self.followPassiveTextField.text = self.minimumLine[SchemesSong.targetRemote.illMaterialKey];
    [self remembersSlidePlayEqualAscendedLazyView:self.followPassiveTextField text:SchemesSong.albumHexAgeFix.acceptedManagerProteinAdjustBin];
    [self.view addSubview:self.followPassiveTextField];
    [self.followPassiveTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.cousinGaelicTextField.mas_bottom).offset(SchemesSong.targetRemote.canonBattery);
        make.left.right.equalTo(self.cousinGaelicTextField);
        make.height.mas_equalTo(SchemesSong.targetRemote.hasBlurBuddy);
    }];
    
    
    UIButton *shareHandButton = [SchemesSong yetPickerDecomposeYouHundredColor:SchemesSong.albumHexAgeFix.illSinkLearnedCorrectedReadable];
    [shareHandButton addTarget:self action:@selector(consoleKilowattPrologMapQuitAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:shareHandButton];
    [shareHandButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.followPassiveTextField.mas_bottom).offset(SchemesSong.targetRemote.canonBattery);
        make.left.right.equalTo(self.followPassiveTextField);
        make.height.mas_equalTo(SchemesSong.targetRemote.pingDirtySin);
    }];
    
    
    self.dueAtomVeryButton = [SchemesSong malePubReclaimOfferKit:SchemesSong.albumHexAgeFix.armWetTooAffectedDetermineRet];
    [self.dueAtomVeryButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.dueAtomVeryButton addTarget:self action:@selector(ouncesButAnyHoursAmericanAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.dueAtomVeryButton];
    [self.dueAtomVeryButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(shareHandButton.mas_bottom).offset(SchemesSong.targetRemote.wrapArtsDay);
        make.centerX.equalTo(self.view);
    }];
}

- (void)remembersSlidePlayEqualAscendedLazyView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(SchemesSong.targetRemote.pingDirtySin, SchemesSong.targetRemote.hasBlurBuddy)};
    UILabel *dogRound = [[UILabel alloc] initWithFrame:frame];
    dogRound.text = text;
    dogRound.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = dogRound;
}

- (void)ouncesButAnyHoursAmericanAction:(UIButton *)sender {
    [[JobDegreeManager shared] decidePinchZoneSayInsulinSuccessViewController:self.navigationController];
}

- (void)consoleKilowattPrologMapQuitAction:(UIButton *)sender {
    sender.hidden = YES;
    self.baseThinLabel.hidden = YES;
    self.hybridBarView.hidden = NO;
    self.focusJoinView.hidden = NO;
    self.dueAtomVeryButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(SchemesSong.targetRemote.mostJobBeenFormatRenderWidth, SchemesSong.targetRemote.baseArtMaxImplicitArteryMix-SchemesSong.targetRemote.primeAdapter));
    }];
    [self.cousinGaelicTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.hybridBarView.mas_bottom).offset(SchemesSong.targetRemote.canonBattery);
    }];
    [self.view layoutIfNeeded];
    
    BOOL inset = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:SchemesSong.targetRemote.adjustedBulgarianNorthRequestedAdverbPrintClusters];
    if (!inset) {
        self.throughRowButton.hidden = NO;
        [NotAlertView linearAlpineDryMetadataClickHighest:nil message:SchemesSong.albumHexAgeFix.pointSpeakingNineteenAmericanLess completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= SchemesSong.targetRemote.identityTemp;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:lacrosseTatarSpineRoomDisableRole:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image lacrosseTatarSpineRoomDisableRole:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[JobDegreeManager shared] decidePinchZoneSayInsulinSuccessViewController:self.navigationController];
        [IcyToast garbage:SchemesSong.albumHexAgeFix.golfPacketUnboundedSexArchived];
    }else {
        self.throughRowButton.hidden = NO;
        [NotAlertView linearAlpineDryMetadataClickHighest:nil message:SchemesSong.albumHexAgeFix.pointSpeakingNineteenAmericanLess completion:nil];
    }
}

@end
