






#import "TradKirghizViewController.h"
#import "SDWebImageManager.h"
#import "SobToast.h"
#import "NSString+WorldHold.h"

@interface TradKirghizViewController ()

@property (nonatomic, strong) UIImageView *fitSumShapeImageView;
@property (nonatomic, strong) UITextField *netBundleTextField;
@property (nonatomic, strong) UITextField *findRepeatsTextField;

@end

@implementation TradKirghizViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.napEyeCityButton.hidden = [self.chunkySmall[0] boolValue];
    
    CGFloat uniqueIncludesSelectIndianMessage = IndicesBest.trustMainArm.pinThirdSnap;
    
    UILabel *fatLabel = [IndicesBest bigSuchCutTemplatePlatform:IndicesBest.linerSharpness.sidebarJoiningBlueStorylineExecuting];
    fatLabel.numberOfLines = 0;
    [self.view addSubview:fatLabel];
    [fatLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(IndicesBest.trustMainArm.modalHeapWon);
        make.left.mas_equalTo(IndicesBest.trustMainArm.hexYouJabber);
        make.right.mas_equalTo(-IndicesBest.trustMainArm.hexYouJabber);
    }];
    
    
    self.netBundleTextField = [IndicesBest allowMethodField:IndicesBest.linerSharpness.patchCommittedNormalKinExcludePackets isSecure:NO];
    [self.view addSubview:self.netBundleTextField];
    [self.netBundleTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(fatLabel.mas_bottom).offset(uniqueIncludesSelectIndianMessage);
        make.left.mas_equalTo(IndicesBest.trustMainArm.wonDolbyTime);
        make.right.mas_equalTo(-IndicesBest.trustMainArm.wonDolbyTime);
        make.height.mas_equalTo(IndicesBest.trustMainArm.toolHowChest);
    }];
    
    
    self.findRepeatsTextField = [IndicesBest allowMethodField:IndicesBest.linerSharpness.providedClientArmFourDestroyImplicit isSecure:NO];;
    [self.view addSubview:self.findRepeatsTextField];
    [self.findRepeatsTextField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.netBundleTextField.mas_bottom).offset(uniqueIncludesSelectIndianMessage);
        make.left.right.equalTo(self.netBundleTextField);
        make.height.mas_equalTo(IndicesBest.trustMainArm.toolHowChest);
    }];
    
    
    UIImageView *shrinkImageView = nil;
    if ([self.chunkySmall[1] length] > 0) {
        
        shrinkImageView = [[UIImageView alloc] init];
        shrinkImageView.backgroundColor = UIColor.lightGrayColor;
        shrinkImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.view addSubview:shrinkImageView];
        [shrinkImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.findRepeatsTextField.mas_bottom).offset(uniqueIncludesSelectIndianMessage);
            make.width.mas_equalTo(self.findRepeatsTextField);
            make.centerX.mas_equalTo(0);
        }];
        self.fitSumShapeImageView = shrinkImageView;
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:self.chunkySmall[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(), ^{
                shrinkImageView.image = image2;
                CGFloat might = image2.size.height / image2.size.width;
                [shrinkImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                    make.height.mas_equalTo((IndicesBest.trustMainArm.plugPageSindhiOperatorOrdinalWidth -IndicesBest.trustMainArm.wonDolbyTime*2)*might);
                }];
                [self.view layoutIfNeeded];
                
                [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
                    make.center.mas_equalTo(0);
                    CGFloat height = self.fitSumShapeImageView ? self.fitSumShapeImageView.frame.size.height + IndicesBest.trustMainArm.pinThirdSnap +IndicesBest.trustMainArm.decreaseReaderPassivelyEqualExtractLocator : IndicesBest.trustMainArm.decreaseReaderPassivelyEqualExtractLocator;
                    
                    make.size.mas_equalTo(CGSizeMake(IndicesBest.trustMainArm.plugPageSindhiOperatorOrdinalWidth, MIN(height, UIScreen.mainScreen.bounds.size.height)));
                    if (height > UIScreen.mainScreen.bounds.size.height) {
                        [self.fitSumShapeImageView mas_updateConstraints:^(MASConstraintMaker *make) {
                            make.height.mas_equalTo(self.fitSumShapeImageView.frame.size.height-(height-UIScreen.mainScreen.bounds.size.height));
                        }];
                    }
                }];
            });
        }];
    }
    
    
    UIButton *cancelMayButton = [IndicesBest faxDraftDialogEarCutterColor:IndicesBest.linerSharpness.secondOverageSaturatedHungarianSpecial];
    [cancelMayButton addTarget:self action:@selector(ascenderSpecifyForGramCallColor:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:cancelMayButton];
    [cancelMayButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(-IndicesBest.trustMainArm.hybridSunWay);
        make.left.right.equalTo(self.netBundleTextField);
        make.height.mas_equalTo(IndicesBest.trustMainArm.originalTint);
    }];
    
}

- (void)ascenderSpecifyForGramCallColor:(id)sender {

}

@end
