






#import "YearApplyingViewController.h"
#import "RepeatPubWhoCell.h"
#import "NSString+AffineDog.h"
#import "SockSunVectorCostWith.h"

@interface YearApplyingViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong) SockSunVectorCostWith *trashLaotian;

@property (nonatomic, strong) UITableView *wirePurpleView;

@property (nonatomic, assign) NSInteger dryNearSuchAnd;

@property (nonatomic, strong) UIButton *tagMapButton;

@end

@implementation YearApplyingViewController

- (SockSunVectorCostWith *)trashLaotian {
    return self.manyLeadOur;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.rowProjectButton.hidden = NO;
    
    UILabel *label = [UILabel new];
    label.text = RedFlexible.daySentFaxWill.schoolCat;
    label.textColor = [RedFlexible northTextColor];
    label.font = [UIFont systemFontOfSize:RedFlexible.capContinued.preferredWho];
    [self.view addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.rowProjectButton);
        make.centerX.equalTo(self.view);
        make.height.mas_equalTo(RedFlexible.capContinued.sparseYouNap);
    }];
    
    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = RedFlexible.capContinued.pinchExtract;
    
    NSString *paletteDog = self.trashLaotian.socketForce?:self.trashLaotian.hasSizeDue;
    
    _tagMapButton = [RedFlexible authorNumeralPivotRecipientPluralColor: [RedFlexible.daySentFaxWill.farPassBag stringByAppendingFormat:@" %@",paletteDog]];

    [_tagMapButton addTarget:self action:@selector(editorsWhileSubfamilyCyclingFilterClicked:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:_tagMapButton];
    [_tagMapButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(RedFlexible.capContinued.composeDone);
        make.right.equalTo(self.view).offset(-RedFlexible.capContinued.composeDone);
        make.bottom.equalTo(self.view).offset(-RedFlexible.capContinued.composeDone);
        make.height.mas_equalTo(RedFlexible.capContinued.subAtomExact);
    }];

    
    _wirePurpleView = [[UITableView alloc] initWithFrame:CGRectZero style:(UITableViewStylePlain)];
    
    _wirePurpleView.backgroundColor = [RedFlexible callbacksScrolledTakeButterflyGetImage] ? UIColor.clearColor : UIColor.systemGray6Color;
    _wirePurpleView.contentInset = UIEdgeInsetsMake(0, 0, 10, 0);
    _wirePurpleView.separatorStyle = UITableViewCellSeparatorStyleNone;
    _wirePurpleView.rowHeight = RedFlexible.capContinued.strictNormal;
    _wirePurpleView.delegate = self;
    _wirePurpleView.dataSource = self;
    [_wirePurpleView registerClass:[RepeatPubWhoCell class] forCellReuseIdentifier:NSStringFromClass(RepeatPubWhoCell.class)];
    
    [self.view addSubview:_wirePurpleView];
    [_wirePurpleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(label.mas_bottom).offset(RedFlexible.capContinued.submitPrint);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(_tagMapButton.mas_top);
    }];
    
    NSIndexPath *indexPath=[NSIndexPath indexPathForRow:0 inSection:0];
   [_wirePurpleView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
   NSIndexPath *path=[NSIndexPath indexPathForItem:0 inSection:0];
   [self tableView:_wirePurpleView didSelectRowAtIndexPath:path];
}

- (void)editorsWhileSubfamilyCyclingFilterClicked:(id)sender {
    [[PerformerManager shared] threeEarWrapWindow];
    if (self.wonHoldDogRaw && [self.wonHoldDogRaw respondsToSelector:@selector(objectCharOverall:)]) {
        [self.wonHoldDogRaw objectCharOverall:self.trashLaotian.cervicalBookmarkAvailArteryCivil[self.dryNearSuchAnd]];
    }
}

- (UIView *)topScenePanelRespectsImmutable:(LexicalJobBlindingHasPicturesSalt *)item {
    
    if (!item) {
        return [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
    }
    
    CGFloat exits = 30;
    
    UIView *pubTooView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 65)];
    
    CGFloat quick = 5;
    
    UILabel *eraKazakh = [[UILabel alloc] init];
    [pubTooView addSubview:eraKazakh];
    eraKazakh.text = [NSString stringWithFormat:@"%@:", RedFlexible.daySentFaxWill.panoramasOperatingKeysEntitledFilm];
    eraKazakh.font = [UIFont boldSystemFontOfSize:15];
    eraKazakh.textColor = UIColor.darkGrayColor;
    [eraKazakh mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(quick);
        make.left.mas_equalTo(12);
        make.height.mas_equalTo(exits);
    }];
    
    UILabel *femaleMail = [[UILabel alloc] init];
    [pubTooView addSubview:femaleMail];
    femaleMail.text = item.extentThinContainedWhiteBreak;
    femaleMail.textColor = UIColor.systemOrangeColor;
    [femaleMail mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(quick);
        make.right.mas_equalTo(-10);
        make.height.mas_equalTo(exits);
    }];
    quick += exits;
    
    UILabel *joinMapCount = [[UILabel alloc] init];
    [pubTooView addSubview:joinMapCount];
    joinMapCount.text = [NSString stringWithFormat:@"%@:", RedFlexible.daySentFaxWill.volumeBigRotatingCollectorRemovalPromotion];
    joinMapCount.font = [UIFont boldSystemFontOfSize:15];
    joinMapCount.textColor = UIColor.darkGrayColor;
    [joinMapCount mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(quick);
        make.left.mas_equalTo(12);
        make.height.mas_equalTo(exits);
    }];
    
    UILabel *putBeganCount = [[UILabel alloc] init];
    [pubTooView addSubview:putBeganCount];
    putBeganCount.text = item.boundReasonProxyAngleColumn;
    putBeganCount.textColor = UIColor.systemOrangeColor;
    [putBeganCount mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(quick);
        make.right.mas_equalTo(-10);
        make.height.mas_equalTo(exits);
    }];
    
    return pubTooView;
}

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

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    RepeatPubWhoCell *deny = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(RepeatPubWhoCell.class) forIndexPath:indexPath];
    deny.needNapHow = self.trashLaotian.cervicalBookmarkAvailArteryCivil[indexPath.row];;
    return deny;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *deny = [tableView cellForRowAtIndexPath:indexPath];
    if (deny) {
        deny.selected = YES;
        _dryNearSuchAnd = indexPath.row;
    }

LexicalJobBlindingHasPicturesSalt *item = self.trashLaotian.cervicalBookmarkAvailArteryCivil[indexPath.row];
    _wirePurpleView.tableHeaderView = item.daughterFaxSecondaryGigahertzDuplicate ? [self topScenePanelRespectsImmutable:item]:nil;
    
    [_tagMapButton setTitle:[RedFlexible.daySentFaxWill.farPassBag stringByAppendingFormat:@" %@",item.socketForce] forState:UIControlStateNormal];
}

- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *deny = [tableView cellForRowAtIndexPath:indexPath];
    if (deny) {
        deny.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(RedFlexible.capContinued.composeDone);
            make.right.mas_equalTo(-RedFlexible.capContinued.composeDone);
            make.height.mas_equalTo(RedFlexible.capContinued.gramLeapDarwinWidth);
            make.centerY.mas_equalTo(0);
        }];
    }else {
        [self.view mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.width.mas_equalTo(RedFlexible.capContinued.gramLeapDarwinWidth);
            make.top.mas_equalTo(RedFlexible.capContinued.composeDone);
            make.bottom.mas_equalTo(-RedFlexible.capContinued.composeDone);
            make.centerX.mas_equalTo(0);
        }];
    }
}

- (void)notifyingResultsCatEarSquaredAction:(UIButton *)sender{
    [super notifyingResultsCatEarSquaredAction:sender];
    if (self.wonHoldDogRaw && [self.wonHoldDogRaw respondsToSelector:@selector(canSensitiveInvokePreciseRevertingChromeExemplar)]) {
        [self.wonHoldDogRaw canSensitiveInvokePreciseRevertingChromeExemplar];
    }
}
@end
