






#import "EndRetFrameViewController.h"
#import "SDWebImageManager.h"
#import "GetToast.h"
#import "NSString+FindPrice.h"

@interface EndRetFrameViewController ()

@property (nonatomic, strong) UIImageView *plugOptRankImageView;
@property (nonatomic, strong) UITextField *fiveRebusTextField;
@property (nonatomic, strong) UITextField *spellLambdaTextField;

@end

@implementation EndRetFrameViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.funkSphereButton.hidden = [self.cardTurnSum[0] boolValue];
    
    CGFloat certIssuerOffsetSubgroupTool = TextualTemp.cancelsParse.abortIcySlab;
    
    UILabel *kitLabel = [TextualTemp mismatchWideSourcesSoloRows:TextualTemp.mindSnowHeader.songBinArmourManSix];
    kitLabel.numberOfLines = 0;
    [self.view addSubview:kitLabel];
    [kitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(TextualTemp.cancelsParse.canonStalled);
        make.left.mas_equalTo(TextualTemp.cancelsParse.napSpaceOver);
        make.right.mas_equalTo(-TextualTemp.cancelsParse.napSpaceOver);
    }];
    
    
    self.fiveRebusTextField = [TextualTemp calorieSwapField:TextualTemp.mindSnowHeader.nodeLineCanceledOptStrictOwnership isSecure:NO];
    [self.view addSubview:self.fiveRebusTextField];
    [self.fiveRebusTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(kitLabel.mas_bottom).offset(certIssuerOffsetSubgroupTool);
        make.left.mas_equalTo(TextualTemp.cancelsParse.sonQueryFind);
        make.right.mas_equalTo(-TextualTemp.cancelsParse.sonQueryFind);
        make.height.mas_equalTo(TextualTemp.cancelsParse.collapsedAre);
    }];
    
    
    self.spellLambdaTextField = [TextualTemp calorieSwapField:TextualTemp.mindSnowHeader.principalCoachedCycleSiteMountOldest isSecure:NO];;
    [self.view addSubview:self.spellLambdaTextField];
    [self.spellLambdaTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.fiveRebusTextField.mas_bottom).offset(certIssuerOffsetSubgroupTool);
        make.left.right.equalTo(self.fiveRebusTextField);
        make.height.mas_equalTo(TextualTemp.cancelsParse.collapsedAre);
    }];
    
    
    UIImageView *visionImageView = nil;
    if ([self.cardTurnSum[1] length] > 0) {
        
        visionImageView = [[UIImageView alloc] init];
        visionImageView.backgroundColor = UIColor.lightGrayColor;
        visionImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:visionImageView];
        [visionImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.spellLambdaTextField.mas_bottom).offset(certIssuerOffsetSubgroupTool);
            make.width.mas_equalTo(self.spellLambdaTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.plugOptRankImageView = visionImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.cardTurnSum[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(), ^{
                visionImageView.image = image2;
                CGFloat bayer = image2.size.height / image2.size.width;
                [visionImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((TextualTemp.cancelsParse.penOneBondGeneratorNetWidth -TextualTemp.cancelsParse.sonQueryFind*2)*bayer);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.plugOptRankImageView ? self.plugOptRankImageView.frame.size.height + TextualTemp.cancelsParse.abortIcySlab +TextualTemp.cancelsParse.nepaliLongerGatherOccurStrongestSerbian : TextualTemp.cancelsParse.nepaliLongerGatherOccurStrongestSerbian;
                    
                    make.size.mas_equalTo(CGSizeMake(TextualTemp.cancelsParse.penOneBondGeneratorNetWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.plugOptRankImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.plugOptRankImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *distortedButton = [TextualTemp preventLinkDeriveExponentRateColor:TextualTemp.mindSnowHeader.sockRankEraFlatnessPress];
    [distortedButton addTarget:self action:@selector(drainFlatDesiredPercentWayCache:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:distortedButton];
    [distortedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-TextualTemp.cancelsParse.winImageSign);
        make.left.right.equalTo(self.fiveRebusTextField);
        make.height.mas_equalTo(TextualTemp.cancelsParse.utteranceHit);
    }];
    
}

- (void)drainFlatDesiredPercentWayCache:(id)sender {

}

@end
