






#import "PosterCroatianViewController.h"
#import <WebKit/WebKit.h>
#import <WebKit/WKFoundation.h>
#import "NSString+Nanograms.h"
#import "NSString+CostShutter.h"

@interface PosterCroatianViewController ()<UIScrollViewDelegate,WKNavigationDelegate>

@property (nonatomic, strong) UISegmentedControl *evictSliceEastControl;
@property (nonatomic, strong) UIView * dryCopyrightFarReversedDominant;
@property (nonatomic, strong) UIView * lifetimeSoundWaxTerminalHelpers;

@property (nonatomic, strong) UIScrollView * makeGolfOneView;

@end

@implementation PosterCroatianViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.carIcyMaleButton.hidden = YES;
    self.anyOpaqueButton.hidden = YES;
    
    UISegmentedControl *maleTenView = [[UISegmentedControl alloc] initWithItems:@[FixChunkBad.passLazyUnique.napReverseAppearingPersonalUnlimitedAnimating,FixChunkBad.passLazyUnique.suchDisposeFileAchievedResultsSucceeded]];
    maleTenView.layer.masksToBounds = YES; 
    maleTenView.layer.cornerRadius = 2;    
    [maleTenView setTitleTextAttributes:@{NSForegroundColorAttributeName:[FixChunkBad topOpaqueColor]} forState:UIControlStateSelected];
    [maleTenView setTitleTextAttributes:@{NSForegroundColorAttributeName:[FixChunkBad topOpaqueColor]} forState:UIControlStateNormal];
    [self.view addSubview:maleTenView];
    [maleTenView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view);
        make.top.mas_equalTo(FixChunkBad.swedishTwist.calciumGasp);
    }];
    [maleTenView addTarget:self action:@selector(sigmaEchoMost:) forControlEvents:UIControlEventValueChanged];
    self.evictSliceEastControl = maleTenView;
    
    _makeGolfOneView = [[UIScrollView alloc]init];
    _makeGolfOneView.pagingEnabled = YES;
    _makeGolfOneView.delegate = self;
    [self.view addSubview:_makeGolfOneView];
    [_makeGolfOneView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(FixChunkBad.swedishTwist.spacingGreen);
        make.right.equalTo(self.view).offset(-FixChunkBad.swedishTwist.spacingGreen);
        make.top.equalTo(self.view).offset(FixChunkBad.swedishTwist.minorDiskTop);
        make.bottom.equalTo(self.view).offset(-FixChunkBad.swedishTwist.negateSayHer);
    }];
    
    UIView *containerView = [UIView new];
    containerView.backgroundColor = UIColor.whiteColor;
    [self.makeGolfOneView addSubview:containerView];
    [containerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.makeGolfOneView);
        make.height.equalTo(_makeGolfOneView);
    }];
    
    UIView * patchMarathi = [self dashTorqueView:[FixChunkBad sexualPageLateOwnReachable]];
    [containerView addSubview:patchMarathi];
    [patchMarathi mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.bottom.equalTo(containerView);
        make.width.mas_equalTo(self.makeGolfOneView);
    }];
    self.dryCopyrightFarReversedDominant = patchMarathi;
    
    UIView * sinkPieceJob = [self dashTorqueView:[FixChunkBad effortEightCelticClearedSin]];
    [containerView addSubview:sinkPieceJob];
    [sinkPieceJob mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(patchMarathi.mas_right);
        make.bottom.top.equalTo(containerView);
        make.width.mas_equalTo(self.makeGolfOneView);
    }];
    self.lifetimeSoundWaxTerminalHelpers = sinkPieceJob;
    
    [containerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(sinkPieceJob.mas_right);
    }];
    
    if (![self.cellularKin boolValue]) {
        UIButton *herFailButton = [FixChunkBad transportLastLightDelayPlaneColor:FixChunkBad.passLazyUnique.lineStreamed];
        [herFailButton setBackgroundImage:[UIImage heartbeatSplitColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateNormal];
        [herFailButton addTarget:self action:@selector(senderTraveledStereoInvisibleLaunchSugar:) forControlEvents:(UIControlEventTouchUpInside)];
        [self.view addSubview:herFailButton];
        [herFailButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self.view).offset(-FixChunkBad.swedishTwist.catMirrored);
            make.centerX.equalTo(self.view).multipliedBy(.65);
            make.height.mas_equalTo(FixChunkBad.swedishTwist.romanUnlearn);
        }];
    }
    
    UIButton *denyHerButton =  [FixChunkBad transportLastLightDelayPlaneColor:FixChunkBad.passLazyUnique.fitFeedKit];
    [denyHerButton addTarget:self action:@selector(tapChargingPublicLeadVibrancyOvulation:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:denyHerButton];
    [denyHerButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.view).offset(-FixChunkBad.swedishTwist.catMirrored);
        make.centerX.equalTo(self.view).multipliedBy(![self.cellularKin boolValue]?1.35:1);
        make.height.mas_equalTo(FixChunkBad.swedishTwist.romanUnlearn);
    }];
    
    maleTenView.selectedSegmentIndex = 0;
    [self sigmaEchoMost:maleTenView];
}

-(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
    [self.evictSliceEastControl setSelectedSegmentIndex:scrollView.contentOffset.x/self.view.frame.size.width ==0?0:1];
    [self drySoftballWarpGenerateCarrierText:scrollView.contentOffset.x/self.view.frame.size.width ==0?0:1];
}

- (void)sigmaEchoMost:(UISegmentedControl *)sender {
    [self drySoftballWarpGenerateCarrierText:sender.selectedSegmentIndex == 0?0:1];
    [self.makeGolfOneView setContentOffset:CGPointMake(sender.selectedSegmentIndex == 0?0:self.makeGolfOneView.frame.size.width, 0) animated:YES];
}

- (void)drySoftballWarpGenerateCarrierText:(NSInteger)type {
    NSString *skipLawUse = nil;
    UIView *contentView = nil;
    skipLawUse = type == 0 ? [FixChunkBad sexualPageLateOwnReachable]:[FixChunkBad effortEightCelticClearedSin];
    contentView = type == 0 ? self.dryCopyrightFarReversedDominant:self.lifetimeSoundWaxTerminalHelpers;
    
    if (skipLawUse.resultsFully) {
        return;
    }
    
    if ([[skipLawUse pathExtension] containsString:FixChunkBad.swedishTwist.cellLightenSurrogateGolfResults]) {
        UITextView *winView = (UITextView *)contentView;
        if (winView.text.length > 0) {
            return;
        }

        
        [SerialLossView rawSlantAloneView:contentView];

        
        NSURL *url = [NSURL URLWithString:skipLawUse];
        NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithURL:url
                                                                 completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
            
            dispatch_async(dispatch_get_main_queue(), ^{
                
                [SerialLossView printableLostPerformsBridgingBagView:contentView];
                
                if (error || data.length == 0) {
                    
                    winView.text = FixChunkBad.passLazyUnique.featureJobAgeInterlaceSoundPack;
                    return;
                }
                
                
                NSString *undoPetabytes = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
                winView.text = undoPetabytes ?: FixChunkBad.passLazyUnique.addRectifiedMenuVelocityDebuggerCollectedMinder;
            });
        }];
        
        [task resume];

    }else {
        WKWebView *mayWay = (WKWebView *)contentView;
        if (!mayWay.isLoading && mayWay.estimatedProgress == 1) {
            [SerialLossView printableLostPerformsBridgingBagView:contentView];
            return;
        }
        [SerialLossView rawSlantAloneView:contentView];
        NSString *objectUse =  [skipLawUse.slovakSunUnpluggedOwnerAgeEntitled stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
        NSURL *url = [NSURL URLWithString:objectUse];
        NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:15.0];
        [mayWay loadRequest:request];
    }
}

- (void)senderTraveledStereoInvisibleLaunchSugar:(id)sender {
    [self floatingAnchoredFlatnessFaxPronounAction:nil];
    if (self.fullScrollAbsentExchangesSimulates) {
        self.fullScrollAbsentExchangesSimulates(NO);
    }
}

- (void)tapChargingPublicLeadVibrancyOvulation:(id)sender {
    [self floatingAnchoredFlatnessFaxPronounAction:nil];
    if (self.fullScrollAbsentExchangesSimulates) {
        self.fullScrollAbsentExchangesSimulates(YES);
    }
}

- (UIView *)dashTorqueView:(NSString *)string {
    UIView *youHowDutch = nil;
    if ([[string pathExtension] containsString:FixChunkBad.swedishTwist.cellLightenSurrogateGolfResults]) {
        UITextView * splitFar = [UITextView new];
        splitFar.editable = NO;
        splitFar.backgroundColor = UIColor.whiteColor;
        splitFar.textColor = UIColor.grayColor;
        youHowDutch = splitFar;
    }else {
        WKWebView *illPortPlus = [[WKWebView alloc] initWithFrame:CGRectZero];
        illPortPlus.backgroundColor = UIColor.clearColor;
        illPortPlus.scrollView.backgroundColor = UIColor.lightGrayColor;
        illPortPlus.opaque = YES;
        illPortPlus.scrollView.bounces =NO;
        illPortPlus.scrollView.showsVerticalScrollIndicator = NO;
        illPortPlus.scrollView.showsHorizontalScrollIndicator = NO;
        illPortPlus.navigationDelegate = self;
        youHowDutch = illPortPlus;
    }
    return youHowDutch;
}

- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
    [SerialLossView printableLostPerformsBridgingBagView:webView];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    UIEdgeInsets joinDogMax = [[RelevanceManager shared] ropeAnimatorWindow].safeAreaInsets;
    joinDogMax.top    += 10;
    joinDogMax.left   += 10;
    joinDogMax.bottom += 10;
    joinDogMax.right  += 10;

    [self.view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(joinDogMax);
    }];
}

@end
