






#import "StoreTabEraViewController.h"
#import "SDWebImageManager.h"
#import "ArtToast.h"
#import "NSString+DanishOff.h"

@interface StoreTabEraViewController ()

@property (nonatomic, strong) UIImageView *keysRealOneImageView;
@property (nonatomic, strong) UITextField *sheInviteTextField;
@property (nonatomic, strong) UITextField *splitCursorTextField;

@end

@implementation StoreTabEraViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.sendGermanButton.hidden = [self.dayNorthPan[0] boolValue];
    
    CGFloat parentTabDescentGradientPeriodic = ApplyToggle.findSwipeOur.ubiquityDraw;
    
    UILabel *wayLabel = [ApplyToggle sheCompoundAlphaScanningObsolete:ApplyToggle.subDayEventDay.photoTargetedEffectTouchesBehaviors];
    wayLabel.numberOfLines = 0;
    [self.view addSubview:wayLabel];
    [wayLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ApplyToggle.findSwipeOur.napAccessory);
        make.left.mas_equalTo(ApplyToggle.findSwipeOur.hexPackIntro);
        make.right.mas_equalTo(-ApplyToggle.findSwipeOur.hexPackIntro);
    }];
    
    
    self.sheInviteTextField = [ApplyToggle noneInfoPanField:ApplyToggle.subDayEventDay.dismissalComponentChunkEmailArtsRed isSecure:NO];
    [self.view addSubview:self.sheInviteTextField];
    [self.sheInviteTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(wayLabel.mas_bottom).offset(parentTabDescentGradientPeriodic);
        make.left.mas_equalTo(ApplyToggle.findSwipeOur.columnSonFor);
        make.right.mas_equalTo(-ApplyToggle.findSwipeOur.columnSonFor);
        make.height.mas_equalTo(ApplyToggle.findSwipeOur.extentTryOdd);
    }];
    
    
    self.splitCursorTextField = [ApplyToggle noneInfoPanField:ApplyToggle.subDayEventDay.mustUploadingSaveHoursVisionAxes isSecure:NO];;
    [self.view addSubview:self.splitCursorTextField];
    [self.splitCursorTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.sheInviteTextField.mas_bottom).offset(parentTabDescentGradientPeriodic);
        make.left.right.equalTo(self.sheInviteTextField);
        make.height.mas_equalTo(ApplyToggle.findSwipeOur.extentTryOdd);
    }];
    
    
    UIImageView *modifyImageView = nil;
    if ([self.dayNorthPan[1] length] > 0) {
        
        modifyImageView = [[UIImageView alloc] init];
        modifyImageView.backgroundColor = UIColor.lightGrayColor;
        modifyImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:modifyImageView];
        [modifyImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.splitCursorTextField.mas_bottom).offset(parentTabDescentGradientPeriodic);
            make.width.mas_equalTo(self.splitCursorTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.keysRealOneImageView = modifyImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.dayNorthPan[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(), ^{
                modifyImageView.image = image2;
                CGFloat cross = image2.size.height / image2.size.width;
                [modifyImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((ApplyToggle.findSwipeOur.periodSpacingConstantKazakhModifyWidth -ApplyToggle.findSwipeOur.columnSonFor*2)*cross);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.keysRealOneImageView ? self.keysRealOneImageView.frame.size.height + ApplyToggle.findSwipeOur.ubiquityDraw +ApplyToggle.findSwipeOur.hangEyeSplitUnsignedAdapterJob : ApplyToggle.findSwipeOur.hangEyeSplitUnsignedAdapterJob;
                    
                    make.size.mas_equalTo(CGSizeMake(ApplyToggle.findSwipeOur.periodSpacingConstantKazakhModifyWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.keysRealOneImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.keysRealOneImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *segmentedButton = [ApplyToggle audienceOwnerFixSoftwareCombiningColor:ApplyToggle.subDayEventDay.randomMonitoredWriteBurstSpine];
    [segmentedButton addTarget:self action:@selector(redirectSaltEffortFrameStableMercury:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:segmentedButton];
    [segmentedButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-ApplyToggle.findSwipeOur.outSmoothIll);
        make.left.right.equalTo(self.sheInviteTextField);
        make.height.mas_equalTo(ApplyToggle.findSwipeOur.mergeBoxPort);
    }];
    
}

- (void)redirectSaltEffortFrameStableMercury:(id)sender {

}

@end
