






#import "CleanResonantViewController.h"
#import "FixToast.h"
#import "VortexInfo.h"

@interface CleanResonantViewController ()

@property (nonatomic, strong) UIImageView *dutchTiedView;
@property (nonatomic, strong) UIButton *catalanLikeButton;
@property (nonatomic, strong) UIView *curlLemmaView;
@property (nonatomic, strong) UILabel *mapValueLabel;
@property (nonatomic, strong) UITextField *hasSaturatedTextField;
@property (nonatomic, strong) UITextField *aloneInferBinTextField;
@end

@implementation CleanResonantViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.subLoadSumButton.hidden = YES;
    
    if ([VortexInfo highlightRevisionScriptsGaelicReversedImage]) {
        self.dutchTiedView = [[UIImageView alloc] initWithImage:[VortexInfo highlightRevisionScriptsGaelicReversedImage]];
        [self.view addSubview:self.dutchTiedView];
        self.dutchTiedView.hidden = YES;
        [self.dutchTiedView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(MenuCluster.thirteenHand.armMinAuthor);
            make.left.equalTo(self.canCreamyButton.mas_right);
            make.top.equalTo(self.view).offset(MenuCluster.thirteenHand.italicsDrain);
        }];
    }
    
    self.curlLemmaView = [MenuCluster curlLemmaView];
    self.curlLemmaView.hidden = YES;
    [self.view addSubview:self.curlLemmaView];
    [self.curlLemmaView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([VortexInfo highlightRevisionScriptsGaelicReversedImage]) {
            make.centerY.equalTo(self.dutchTiedView);
            make.left.equalTo(self.dutchTiedView.mas_right).offset(MenuCluster.thirteenHand.chunkyMolar);
        }else {
            make.top.equalTo(self.view).offset(MenuCluster.thirteenHand.italicsDrain);
            make.left.equalTo(self.canCreamyButton.mas_right).offset(MenuCluster.thirteenHand.chunkyMolar);
        }
        make.right.equalTo(self.subLoadSumButton.mas_left);
        make.height.mas_equalTo(MenuCluster.thirteenHand.armMinAuthor);
    }];
    
    self.mapValueLabel = [MenuCluster stairRectumFullItsKannada:MenuCluster.hallFloorExist.convertBottomArchivedUnchangedPrecision];
    self.mapValueLabel.numberOfLines = 0;
    [self.view addSubview:self.mapValueLabel];
    [self.mapValueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MenuCluster.thirteenHand.carTurnMalay);
        make.left.mas_equalTo(MenuCluster.thirteenHand.sayIconLevel);
        make.right.mas_equalTo(-MenuCluster.thirteenHand.sayIconLevel);
    }];
    
    
    self.hasSaturatedTextField = [MenuCluster numeratorSubscriptCutterDrizzlePartlyAccount];
    self.hasSaturatedTextField.enabled = NO;
    self.hasSaturatedTextField.text = self.mailBigPack[MenuCluster.thirteenHand.tagThickWaxName];
    [self radioReportInitiallyRotorLacrosseEscapesView:self.hasSaturatedTextField text:MenuCluster.hallFloorExist.attempterTouchesEntitiesTurkmenRussian];
    [self.view addSubview:self.hasSaturatedTextField];
    [self.hasSaturatedTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.mapValueLabel.mas_bottom).offset(MenuCluster.thirteenHand.globalIndian);
        make.left.mas_equalTo(MenuCluster.thirteenHand.twoHitAdverb);
        make.right.mas_equalTo(-MenuCluster.thirteenHand.twoHitAdverb);
        make.height.mas_equalTo(MenuCluster.thirteenHand.hisCursorWho);
    }];
    
    
    self.aloneInferBinTextField = [MenuCluster numeratorSubscriptCutterDrizzlePartlyAccount];
    self.aloneInferBinTextField.enabled = NO;
    self.aloneInferBinTextField.text = self.mailBigPack[MenuCluster.thirteenHand.openAddBoldKey];
    [self radioReportInitiallyRotorLacrosseEscapesView:self.aloneInferBinTextField text:MenuCluster.hallFloorExist.clearRegularParseReadyYear];
    [self.view addSubview:self.aloneInferBinTextField];
    [self.aloneInferBinTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.hasSaturatedTextField.mas_bottom).offset(MenuCluster.thirteenHand.globalIndian);
        make.left.right.equalTo(self.hasSaturatedTextField);
        make.height.mas_equalTo(MenuCluster.thirteenHand.hisCursorWho);
    }];
    
    
    UIButton *carbonCupButton = [MenuCluster systolicFlagSwitchSlovakDenyColor:MenuCluster.hallFloorExist.wrapLemmaLatePullList];
    [carbonCupButton addTarget:self action:@selector(issuePlayTagAreaAscendingAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:carbonCupButton];
    [carbonCupButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.aloneInferBinTextField.mas_bottom).offset(MenuCluster.thirteenHand.globalIndian);
        make.left.right.equalTo(self.aloneInferBinTextField);
        make.height.mas_equalTo(MenuCluster.thirteenHand.armMinAuthor);
    }];
    
    
    self.catalanLikeButton = [MenuCluster hisSubFaxDetachAir:MenuCluster.hallFloorExist.deletionUnlockedVariablesSatisfiedModelProcessor];
    [self.catalanLikeButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.catalanLikeButton addTarget:self action:@selector(malayVibrancySheetPullThinAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.catalanLikeButton];
    [self.catalanLikeButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(carbonCupButton.mas_bottom).offset(MenuCluster.thirteenHand.sheNautical);
        make.centerX.equalTo(self.view);
    }];
}

- (void)radioReportInitiallyRotorLacrosseEscapesView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(MenuCluster.thirteenHand.armMinAuthor, MenuCluster.thirteenHand.hisCursorWho)};
    UILabel *landmark = [[UILabel alloc] initWithFrame:frame];
    landmark.text = text;
    landmark.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = landmark;
}

- (void)malayVibrancySheetPullThinAction:(UIButton *)sender {
    [[PotentialManager shared] brandClinicalVowelPacketAgeCubeViewController:self.navigationController];
}

- (void)issuePlayTagAreaAscendingAction:(UIButton *)sender {
    sender.hidden = YES;
    self.mapValueLabel.hidden = YES;
    self.curlLemmaView.hidden = NO;
    self.dutchTiedView.hidden = NO;
    self.catalanLikeButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(MenuCluster.thirteenHand.pullFemaleIconFitClangWidth, MenuCluster.thirteenHand.sixLiveIgnoreRecoverySixSide-MenuCluster.thirteenHand.errorUnknown));
    }];
    [self.hasSaturatedTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.curlLemmaView.mas_bottom).offset(MenuCluster.thirteenHand.globalIndian);
    }];
    [self.view layoutIfNeeded];
    
    BOOL stand = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:MenuCluster.thirteenHand.slantMenAudiogramSkipBeginningZoomingSalt];
    if (!stand) {
        self.subLoadSumButton.hidden = NO;
        [EarAlertView execAbsentSequencerLaterHourlyFlag:nil message:MenuCluster.hallFloorExist.parsecsStringSlavicFloorAll completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= MenuCluster.thirteenHand.waxSuchRotor;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:lemmaDaysFootersWritePieceLock:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image lemmaDaysFootersWritePieceLock:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[PotentialManager shared] brandClinicalVowelPacketAgeCubeViewController:self.navigationController];
        [FixToast slowCar:MenuCluster.hallFloorExist.elderCinematicBurstSixRun];
    }else {
        self.subLoadSumButton.hidden = NO;
        [EarAlertView execAbsentSequencerLaterHourlyFlag:nil message:MenuCluster.hallFloorExist.parsecsStringSlavicFloorAll completion:nil];
    }
}

@end
