






#import "DidReusableViewController.h"
#import "SDWebImageManager.h"
#import "ButToast.h"
#import "NSString+MidBypass.h"

@interface DidReusableViewController ()

@property (nonatomic, strong) UIImageView *optionSlashImageView;
@property (nonatomic, strong) UITextField *daughtersTextField;
@property (nonatomic, strong) UITextField *lawSegmentsTextField;

@end

@implementation DidReusableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.jobPanListButton.hidden = [self.hashIllPath[0] boolValue];
    
    CGFloat discardedSupplyRetainReceiptContexts = MakerOldest.redoneFinder.dateOrnament;
    
    UILabel *andLabel = [MakerOldest presetUnpluggedProjectsDifferentRing:MakerOldest.patternsTwenty.headSquashSetupIndirectUnlearn];
    andLabel.numberOfLines = 0;
    [self.view addSubview:andLabel];
    [andLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MakerOldest.redoneFinder.authorBitmap);
        make.left.mas_equalTo(MakerOldest.redoneFinder.busScanScale);
        make.right.mas_equalTo(-MakerOldest.redoneFinder.busScanScale);
    }];
    
    
    self.daughtersTextField = [MakerOldest mayValueLawField:MakerOldest.patternsTwenty.developerCustomProducerEditSwapSecurity isSecure:NO];
    [self.view addSubview:self.daughtersTextField];
    [self.daughtersTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(andLabel.mas_bottom).offset(discardedSupplyRetainReceiptContexts);
        make.left.mas_equalTo(MakerOldest.redoneFinder.finalUnlearn);
        make.right.mas_equalTo(-MakerOldest.redoneFinder.finalUnlearn);
        make.height.mas_equalTo(MakerOldest.redoneFinder.kitPredicted);
    }];
    
    
    self.lawSegmentsTextField = [MakerOldest mayValueLawField:MakerOldest.patternsTwenty.stereoRangingWristHiddenSugarCanceled isSecure:NO];;
    [self.view addSubview:self.lawSegmentsTextField];
    [self.lawSegmentsTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.daughtersTextField.mas_bottom).offset(discardedSupplyRetainReceiptContexts);
        make.left.right.equalTo(self.daughtersTextField);
        make.height.mas_equalTo(MakerOldest.redoneFinder.kitPredicted);
    }];
    
    
    UIImageView *funSheImageView = nil;
    if ([self.hashIllPath[1] length] > 0) {
        
        funSheImageView = [[UIImageView alloc] init];
        funSheImageView.backgroundColor = UIColor.lightGrayColor;
        funSheImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:funSheImageView];
        [funSheImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.lawSegmentsTextField.mas_bottom).offset(discardedSupplyRetainReceiptContexts);
            make.width.mas_equalTo(self.lawSegmentsTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.optionSlashImageView = funSheImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.hashIllPath[1]] options:0 progress:nil completed:^(UIImage * _Nullable image2, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
            dispatch_async(dispatch_get_main_queue(), ^{
                funSheImageView.image = image2;
                CGFloat built = image2.size.height / image2.size.width;
                [funSheImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((MakerOldest.redoneFinder.entitledSafariJustifiedOffPutWidth -MakerOldest.redoneFinder.finalUnlearn*2)*built);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.optionSlashImageView ? self.optionSlashImageView.frame.size.height + MakerOldest.redoneFinder.dateOrnament +MakerOldest.redoneFinder.renderTorqueAutomaticOperatingAdvertiseSee : MakerOldest.redoneFinder.renderTorqueAutomaticOperatingAdvertiseSee;
                    
                    make.size.mas_equalTo(CGSizeMake(MakerOldest.redoneFinder.entitledSafariJustifiedOffPutWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.optionSlashImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.optionSlashImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *redResizeButton = [MakerOldest sixPipeGrantingNoneBendColor:MakerOldest.patternsTwenty.torqueNotifiesChargingDegreesEnds];
    [redResizeButton addTarget:self action:@selector(higherSummaryMomentEffortFatStable:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:redResizeButton];
    [redResizeButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-MakerOldest.redoneFinder.hueRainLegal);
        make.left.right.equalTo(self.daughtersTextField);
        make.height.mas_equalTo(MakerOldest.redoneFinder.tripleDialog);
    }];
    
}

- (void)higherSummaryMomentEffortFatStable:(id)sender {
if (self.daughtersTextField.text.diskClusters || self.lawSegmentsTextField.text.diskClusters) {
        [TagAlertView seekingFontStayBeenLibrariesSlovak:MakerOldest.patternsTwenty.retPolish message:MakerOldest.patternsTwenty.preferBevelMailAndSinShoulder completion:nil];
        return;
    }
    if ([self.sameSitePanel respondsToSelector:@selector(areLocatorSoftSizeTwelveMirroringWithName:oneRed:completion:)]) {
        [FetchSenseView furlongsApplyWindow];
        [self.sameSitePanel areLocatorSoftSizeTwelveMirroringWithName:self.daughtersTextField.text oneRed:self.lawSegmentsTextField.text completion:^(id object) {
            [FetchSenseView hashDeciliterChargingArchiveWalkingWindow];
            if ([object boolValue]) {
                [[FunnelArmManager shared] undoSilencedWindow];
                [ButToast packetsFit:MakerOldest.patternsTwenty.rawThinLoadRatioPhraseDrive];
            }
        }];
    }
}

@end
