






#import "ButDenseSameViewController.h"
#import "VisionSecondCell.h"
#import "NSString+SigmaPlay.h"
#import "MoveCosmicEarBannerChanged.h"

@interface ButDenseSameViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong) MoveCosmicEarBannerChanged *encodeFaxSay;

@property (nonatomic, strong) UITableView *invitedTopView;

@property (nonatomic, assign) NSInteger localizesCycle;

@property (nonatomic, strong) UIButton *catLawButton;

@end

@implementation ButDenseSameViewController

- (MoveCosmicEarBannerChanged *)encodeFaxSay {
    return self.artworkBand;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.workOuncesButton.hidden = NO;
    
    UILabel *label = [UILabel new];
    label.text = HerLaunched.pinCarOuterMan.outerTied;
    label.textColor = [HerLaunched ironGuideColor];
    label.font = [UIFont systemFontOfSize:HerLaunched.brownFairKin.canAccording];
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.workOuncesButton);
        make.centerX.equalTo(self.view);
        make.height.mas_equalTo(HerLaunched.brownFairKin.textIllQueue);
    }];
    
    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = HerLaunched.brownFairKin.workSwahili;
    
    NSString *jumpLetter = self.encodeFaxSay.oceanHitNap?:self.encodeFaxSay.allEncrypt;
    
    _catLawButton = [HerLaunched sortSaySpeakersOrnamentsKitColor: [HerLaunched.pinCarOuterMan.unifyDigit stringByAppendingFormat:@" %@",jumpLetter]];

    [_catLawButton addTarget:self action:@selector(zipSexLeakyDivideRefinedClicked:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:_catLawButton];
    [_catLawButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(HerLaunched.brownFairKin.coverEditSaw);
    }];

    
    _invitedTopView = [[UITableView alloc] initWithFrame:CGRectZero style:(UITableViewStylePlain)];
    _invitedTopView.backgroundColor = UIColor.systemGray6Color;
    _invitedTopView.contentInset = UIEdgeInsetsMake(0, 0, 10, 0);
    _invitedTopView.separatorStyle = UITableViewCellSeparatorStyleNone;
    _invitedTopView.rowHeight = HerLaunched.brownFairKin.scriptsDraft;
    _invitedTopView.delegate = self;
    _invitedTopView.dataSource = self;
    [_invitedTopView registerClass:[VisionSecondCell class] forCellReuseIdentifier:NSStringFromClass(VisionSecondCell.class)];
    
    [self.view addSubview:_invitedTopView];
    [_invitedTopView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(label.mas_bottom).offset(HerLaunched.brownFairKin.publicSetup);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(_catLawButton.mas_top);
    }];
    
    NSIndexPath *indexPath=[NSIndexPath indexPathForRow:0 inSection:0];
   [_invitedTopView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
   NSIndexPath *path=[NSIndexPath indexPathForItem:0 inSection:0];
   [self tableView:_invitedTopView didSelectRowAtIndexPath:path];
}

- (void)zipSexLeakyDivideRefinedClicked:(id)sender {
    [[NiacinBigManager shared] anchoringIcyWindow];
    if (self.boxDueRepeats && [self.boxDueRepeats respondsToSelector:@selector(becomeElevenTwitter:)]) {
        [self.boxDueRepeats becomeElevenTwitter:self.encodeFaxSay.airClippingHitAddPen[self.localizesCycle]];
    }
}

- (UIView *)capturedClipSubgroupBirthTower {
    CGFloat three = 30;
    CGFloat height = [self.encodeFaxSay.longerKernelsGainModeLove waitVitaminRevisionsResourcesOur] * three + [self.encodeFaxSay.preservesPurchasedPasswordsPlanCut waitVitaminRevisionsResourcesOur]  * three + 5;
    
    UIView *germanView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, height)];
    
    CGFloat pulse = 5;
    
    if ([self.encodeFaxSay.longerKernelsGainModeLove waitVitaminRevisionsResourcesOur]) {
        UILabel *slopeLabel = [[UILabel alloc] init];
        [germanView addSubview:slopeLabel];
        slopeLabel.text = [NSString stringWithFormat:@"%@:", HerLaunched.pinCarOuterMan.textSolidDecisionSixBouncing];
        slopeLabel.font = [UIFont boldSystemFontOfSize:15];
        slopeLabel.textColor = UIColor.darkGrayColor;
        [slopeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(pulse);
            make.left.mas_equalTo(12);
            make.height.mas_equalTo(three);
        }];
        
        UILabel *underLabel = [[UILabel alloc] init];
        [germanView addSubview:underLabel];
        underLabel.text = self.encodeFaxSay.longerKernelsGainModeLove;
        underLabel.textColor = UIColor.systemOrangeColor;
        [underLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(pulse);
            make.right.mas_equalTo(-10);
            make.height.mas_equalTo(three);
        }];
        pulse += three;
    }
    
    if ([self.encodeFaxSay.preservesPurchasedPasswordsPlanCut waitVitaminRevisionsResourcesOur]) {
        UILabel *slopeLabel = [[UILabel alloc] init];
        [germanView addSubview:slopeLabel];
        slopeLabel.text = [NSString stringWithFormat:@"%@:", HerLaunched.pinCarOuterMan.helloTargetedDanceFiveTemporalMale];
        slopeLabel.font = [UIFont boldSystemFontOfSize:15];
        slopeLabel.textColor = UIColor.darkGrayColor;
        [slopeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(pulse);
            make.left.mas_equalTo(12);
            make.height.mas_equalTo(three);
        }];
        
        UILabel *underLabel = [[UILabel alloc] init];
        [germanView addSubview:underLabel];
        underLabel.text = self.encodeFaxSay.preservesPurchasedPasswordsPlanCut;
        underLabel.textColor = UIColor.systemOrangeColor;
        [underLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(pulse);
            make.right.mas_equalTo(-10);
            make.height.mas_equalTo(three);
        }];
    }
    
    return germanView;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.encodeFaxSay.airClippingHitAddPen.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    VisionSecondCell *exec = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(VisionSecondCell.class) forIndexPath:indexPath];
    exec.regionBeat = self.encodeFaxSay.airClippingHitAddPen[indexPath.row];;
    return exec;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *exec = [tableView cellForRowAtIndexPath:indexPath];
    if (exec) {
        exec.selected = YES;
        _localizesCycle = indexPath.row;
    }
    
_invitedTopView.tableHeaderView = [self capturedClipSubgroupBirthTower];

}

- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *exec = [tableView cellForRowAtIndexPath:indexPath];
    if (exec) {
        exec.selected = NO;
    }
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    if (UIInterfaceOrientationIsPortrait(UIApplication.sharedApplication.statusBarOrientation)) {
#pragma clang diagnostic pop
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(HerLaunched.brownFairKin.scanAskCurl);
            make.right.mas_equalTo(-HerLaunched.brownFairKin.scanAskCurl);
            make.height.mas_equalTo(HerLaunched.brownFairKin.sinMostHomeWaxWidth);
            make.centerY.mas_equalTo(0);
        }];
    }else {
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.width.mas_equalTo(HerLaunched.brownFairKin.sinMostHomeWaxWidth);
            make.top.mas_equalTo(HerLaunched.brownFairKin.scanAskCurl);
            make.bottom.mas_equalTo(-HerLaunched.brownFairKin.scanAskCurl);
            make.centerX.mas_equalTo(0);
        }];
    }
}

- (void)gainSnapEntryIntrinsicSurgeAction:(UIButton *)sender{
    [super gainSnapEntryIntrinsicSurgeAction:sender];
    if (self.boxDueRepeats && [self.boxDueRepeats respondsToSelector:@selector(presenterExchangesSizeGermanPenMillibarsEasy)]) {
        [self.boxDueRepeats presenterExchangesSizeGermanPenMillibarsEasy];
    }
}
@end
