






#import "NotLiveRuleViewController.h"
#import "SDWebImageManager.h"
#import "EggToast.h"
#import "NSString+DublinZip.h"

@interface NotLiveRuleViewController ()

@property (nonatomic, strong) UIImageView *restingBodyImageView;
@property (nonatomic, strong) UITextField *muteSlantTextField;
@property (nonatomic, strong) UITextField *bitFeedRingTextField;

@end

@implementation NotLiveRuleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.tooSumWakeButton.hidden = [self.slashBusAsk[0] boolValue];
    
    CGFloat checksumSheAgentDrySample = MillLiftIll.hintLegalHue.encodedArrow;
    
    UILabel *airLabel = [MillLiftIll offFloaterSenderPickKit:MillLiftIll.cutHoldDateSix.bitUpperWidthPreviewsRoute];
    airLabel.numberOfLines = 0;
    [self.view addSubview:airLabel];
    [airLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MillLiftIll.hintLegalHue.pronounBlink);
        make.left.mas_equalTo(MillLiftIll.hintLegalHue.canExistSent);
        make.right.mas_equalTo(-MillLiftIll.hintLegalHue.canExistSent);
    }];
    
    
    self.muteSlantTextField = [MillLiftIll wayFarsiAddField:MillLiftIll.cutHoldDateSix.sumOfficialCircleReaderLikeWay isSecure:NO];
    [self.view addSubview:self.muteSlantTextField];
    [self.muteSlantTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(airLabel.mas_bottom).offset(checksumSheAgentDrySample);
        make.left.mas_equalTo(MillLiftIll.hintLegalHue.putMakerTree);
        make.right.mas_equalTo(-MillLiftIll.hintLegalHue.putMakerTree);
        make.height.mas_equalTo(MillLiftIll.hintLegalHue.bitSolidMask);
    }];
    
    
    self.bitFeedRingTextField = [MillLiftIll wayFarsiAddField:MillLiftIll.cutHoldDateSix.protocolWeeklyChatSaveVolatileAmbiguity isSecure:NO];;
    [self.view addSubview:self.bitFeedRingTextField];
    [self.bitFeedRingTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.muteSlantTextField.mas_bottom).offset(checksumSheAgentDrySample);
        make.left.right.equalTo(self.muteSlantTextField);
        make.height.mas_equalTo(MillLiftIll.hintLegalHue.bitSolidMask);
    }];
    
    
    UIImageView *hueWinImageView = nil;
    if ([self.slashBusAsk[1] length] > 0) {
        
        hueWinImageView = [[UIImageView alloc] init];
        hueWinImageView.backgroundColor = UIColor.lightGrayColor;
        hueWinImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:hueWinImageView];
        [hueWinImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.bitFeedRingTextField.mas_bottom).offset(checksumSheAgentDrySample);
            make.width.mas_equalTo(self.bitFeedRingTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.restingBodyImageView = hueWinImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.slashBusAsk[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(), ^{
                hueWinImageView.image = image2;
                CGFloat farsi = image2.size.height / image2.size.width;
                [hueWinImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((MillLiftIll.hintLegalHue.bundleFirstAllowDayDepthWidth -MillLiftIll.hintLegalHue.putMakerTree*2)*farsi);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.restingBodyImageView ? self.restingBodyImageView.frame.size.height + MillLiftIll.hintLegalHue.encodedArrow +MillLiftIll.hintLegalHue.uplinkCallMidCreditActivatedPolicies : MillLiftIll.hintLegalHue.uplinkCallMidCreditActivatedPolicies;
                    
                    make.size.mas_equalTo(CGSizeMake(MillLiftIll.hintLegalHue.bundleFirstAllowDayDepthWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.restingBodyImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.restingBodyImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *northPullButton = [MillLiftIll balticUnderageGetFinishedBaselineColor:MillLiftIll.cutHoldDateSix.softCalciumFollowSpherePassively];
    [northPullButton addTarget:self action:@selector(daysCopperEntityAmpereTreeMaximum:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:northPullButton];
    [northPullButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-MillLiftIll.hintLegalHue.illArbitrary);
        make.left.right.equalTo(self.muteSlantTextField);
        make.height.mas_equalTo(MillLiftIll.hintLegalHue.tremorRemove);
    }];
    
}

- (void)daysCopperEntityAmpereTreeMaximum:(id)sender {

}

@end
