






#import "OpaqueWeekdayViewController.h"
#import "AreToast.h"
#import "SheKitInfo.h"

@interface OpaqueWeekdayViewController ()

@property (nonatomic, strong) UIImageView *effortOutView;
@property (nonatomic, strong) UIButton *energyMiterButton;
@property (nonatomic, strong) UIView *clockwiseView;
@property (nonatomic, strong) UILabel *nextKeepLabel;
@property (nonatomic, strong) UITextField *evictPinCallTextField;
@property (nonatomic, strong) UITextField *qualifierReadTextField;
@end

@implementation OpaqueWeekdayViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.sonLockingButton.hidden = YES;
    
    if ([SheKitInfo logIntegerExactnessFunLazyImage]) {
        self.effortOutView = [[UIImageView alloc] initWithImage:[SheKitInfo logIntegerExactnessFunLazyImage]];
        [self.view addSubview:self.effortOutView];
        self.effortOutView.hidden = YES;
        [self.effortOutView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.height.mas_equalTo(CloudyPrice.resetEndsIts.noteTemplate);
            make.left.equalTo(self.cinematicButton.mas_right);
            make.top.equalTo(self.view).offset(CloudyPrice.resetEndsIts.mailCatValue);
        }];
    }
    
    self.clockwiseView = [CloudyPrice clockwiseView];
    self.clockwiseView.hidden = YES;
    [self.view addSubview:self.clockwiseView];
    [self.clockwiseView mas_makeConstraints:^(MASConstraintMaker *make) {
        if ([SheKitInfo logIntegerExactnessFunLazyImage]) {
            make.centerY.equalTo(self.effortOutView);
            make.left.equalTo(self.effortOutView.mas_right).offset(CloudyPrice.resetEndsIts.instantSign);
        }else {
            make.top.equalTo(self.view).offset(CloudyPrice.resetEndsIts.mailCatValue);
            make.left.equalTo(self.cinematicButton.mas_right).offset(CloudyPrice.resetEndsIts.instantSign);
        }
        make.right.equalTo(self.sonLockingButton.mas_left);
        make.height.mas_equalTo(CloudyPrice.resetEndsIts.noteTemplate);
    }];
    
    self.nextKeepLabel = [CloudyPrice respondsRotorMonthAlongsideVariance:CloudyPrice.presentedIrish.englishServerCarrierDiscreteGraceful];
    self.nextKeepLabel.numberOfLines = 0;
    [self.view addSubview:self.nextKeepLabel];
    [self.nextKeepLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(CloudyPrice.resetEndsIts.notBeatLoops);
        make.left.mas_equalTo(CloudyPrice.resetEndsIts.tryCreateYou);
        make.right.mas_equalTo(-CloudyPrice.resetEndsIts.tryCreateYou);
    }];
    
    
    self.evictPinCallTextField = [CloudyPrice tapsClaimBuddyDidTouchAccount];
    self.evictPinCallTextField.enabled = NO;
    self.evictPinCallTextField.text = self.wayLoadEast[CloudyPrice.resetEndsIts.visionOfferName];
    [self olympusBordersRestoreLinearlyAppleSupportsView:self.evictPinCallTextField text:CloudyPrice.presentedIrish.commentFullyParticleThemeSub];
    [self.view addSubview:self.evictPinCallTextField];
    [self.evictPinCallTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.nextKeepLabel.mas_bottom).offset(CloudyPrice.resetEndsIts.napVariables);
        make.left.mas_equalTo(CloudyPrice.resetEndsIts.timeLevelWon);
        make.right.mas_equalTo(-CloudyPrice.resetEndsIts.timeLevelWon);
        make.height.mas_equalTo(CloudyPrice.resetEndsIts.popAdobeUsed);
    }];
    
    
    self.qualifierReadTextField = [CloudyPrice tapsClaimBuddyDidTouchAccount];
    self.qualifierReadTextField.enabled = NO;
    self.qualifierReadTextField.text = self.wayLoadEast[CloudyPrice.resetEndsIts.hexBusDeltaKey];
    [self olympusBordersRestoreLinearlyAppleSupportsView:self.qualifierReadTextField text:CloudyPrice.presentedIrish.dustItemBufferedDecipherLandmark];
    [self.view addSubview:self.qualifierReadTextField];
    [self.qualifierReadTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.evictPinCallTextField.mas_bottom).offset(CloudyPrice.resetEndsIts.napVariables);
        make.left.right.equalTo(self.evictPinCallTextField);
        make.height.mas_equalTo(CloudyPrice.resetEndsIts.popAdobeUsed);
    }];
    
    
    UIButton *presenterButton = [CloudyPrice bridgedEpsilonReferenceLooseStrideColor:CloudyPrice.presentedIrish.rebuildDivideScopeIllBeacons];
    [presenterButton addTarget:self action:@selector(tabPubAgeSobDragAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:presenterButton];
    [presenterButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.qualifierReadTextField.mas_bottom).offset(CloudyPrice.resetEndsIts.napVariables);
        make.left.right.equalTo(self.qualifierReadTextField);
        make.height.mas_equalTo(CloudyPrice.resetEndsIts.noteTemplate);
    }];
    
    
    self.energyMiterButton = [CloudyPrice legalCosmicVitalEntryTower:CloudyPrice.presentedIrish.relayDateUnsafeFootballPromotionSuitable];
    [self.energyMiterButton setContentEdgeInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.energyMiterButton addTarget:self action:@selector(intervalsSortMovementVerticalMediaAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:self.energyMiterButton];
    [self.energyMiterButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(presenterButton.mas_bottom).offset(CloudyPrice.resetEndsIts.hisPostHang);
        make.centerX.equalTo(self.view);
    }];
}

- (void)olympusBordersRestoreLinearlyAppleSupportsView:(UITextField *)textField text:(NSString *)text
{
    CGRect frame = {{0,0},CGSizeMake(CloudyPrice.resetEndsIts.noteTemplate, CloudyPrice.resetEndsIts.popAdobeUsed)};
    UILabel *printAdd = [[UILabel alloc] initWithFrame:frame];
    printAdd.text = text;
    printAdd.textColor = UIColor.redColor;
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = printAdd;
}

- (void)intervalsSortMovementVerticalMediaAction:(UIButton *)sender {
    [[RingMiterManager shared] triggersIntensityAgentBodyExtensionMandatoryViewController:self.navigationController];
}

- (void)tabPubAgeSobDragAction:(UIButton *)sender {
    sender.hidden = YES;
    self.nextKeepLabel.hidden = YES;
    self.clockwiseView.hidden = NO;
    self.effortOutView.hidden = NO;
    self.energyMiterButton.hidden = YES;
    
    [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self.view.superview);
        make.size.mas_equalTo(CGSizeMake(CloudyPrice.resetEndsIts.tallReductionFollowerTemplateHelpersWidth, CloudyPrice.resetEndsIts.qualitySonIllHusbandMicroTaps-CloudyPrice.resetEndsIts.yetKindMovie));
    }];
    [self.evictPinCallTextField mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.clockwiseView.mas_bottom).offset(CloudyPrice.resetEndsIts.napVariables);
    }];
    [self.view layoutIfNeeded];
    
    BOOL solid = [[[[NSBundle mainBundle] infoDictionary] allKeys] containsObject:CloudyPrice.resetEndsIts.publishWonExpectingHueSectionPageFar];
    if (!solid) {
        self.sonLockingButton.hidden = NO;
        [BigAlertView domainPauseTipAllTenDown:nil message:CloudyPrice.presentedIrish.rawMotionOperatingRawRegion completion:nil];
        return;
    }
    CGSize size = self.view.frame.size;
    size.height -= CloudyPrice.resetEndsIts.sheDeveloper;
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
    [self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
    UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:goalStatementArtsStrongGenerateUnsafe:contextInfo:), (__bridge void *)self);
}

- (void)image:(UIImage *)image goalStatementArtsStrongGenerateUnsafe:(NSError *)error contextInfo:(void *)contextInfo
{
    
    if(!error){
        [[RingMiterManager shared] triggersIntensityAgentBodyExtensionMandatoryViewController:self.navigationController];
        [AreToast spaTied:CloudyPrice.presentedIrish.updatesKeyWatchedSoccerLimit];
    }else {
        self.sonLockingButton.hidden = NO;
        [BigAlertView domainPauseTipAllTenDown:nil message:CloudyPrice.presentedIrish.rawMotionOperatingRawRegion completion:nil];
    }
}

@end
