






#import "HierarchyPlusLookupVirtualProducingHomepageViewController.h"
#import "NSString+Preparing.h"

@implementation XXGSelectMobileAccountModel

@end

@interface HierarchyPlusLookupVirtualProducingHomepageViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *heapPlural;
@property (nonatomic, strong) UITableView *nameSpouseView;
@property (nonatomic, assign) NSInteger mediaTypeOccur;
@property (nonatomic, strong) UIButton *tapHashSuchButton;
@property (nonatomic, strong) UIButton *dustLatitudeButton;

@end

@implementation HierarchyPlusLookupVirtualProducingHomepageViewController

- (XXGSelectMobileAccountModel *)heapPlural {
    return self.vitaminWalk;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.logTriggerButton.hidden = YES;
    self.countPeerButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = DenyQuarter.netAcuteLowRow.reversedFractionsLiftReachedSlashes;
    titleLabel.textColor = [DenyQuarter sameAppleColor];
    titleLabel.font = [UIFont systemFontOfSize:DenyQuarter.nowPinReport.bestSolvePan];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(DenyQuarter.nowPinReport.sigmaUnique);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(DenyQuarter.nowPinReport.stoneMapRule);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = DenyQuarter.nowPinReport.flatnessRow;

    
    UIView *darkenView = [[UIView alloc] init];
    darkenView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:darkenView];
    [darkenView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(DenyQuarter.nowPinReport.threeMaxFour);
    }];

    
    _tapHashSuchButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_tapHashSuchButton setTitle:DenyQuarter.netAcuteLowRow.subsetQuery forState:UIControlStateNormal];
    [_tapHashSuchButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_tapHashSuchButton setBackgroundColor:UIColor.systemGray5Color];
    _tapHashSuchButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_tapHashSuchButton addTarget:self action:@selector(frequencyUnsavedCursorsHormoneEachAction:) forControlEvents:UIControlEventTouchUpInside];
    [darkenView addSubview:_tapHashSuchButton];
    [_tapHashSuchButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(darkenView);
        make.width.equalTo(darkenView).multipliedBy(0.5);
    }];

    
    _dustLatitudeButton = [DenyQuarter enhanceBuddyNegateChatMarginColor:DenyQuarter.netAcuteLowRow.ageUsed];
    [_dustLatitudeButton addTarget:self action:@selector(spellBuiltReadTrainingServicesAction:) forControlEvents:UIControlEventTouchUpInside];
    [darkenView addSubview:_dustLatitudeButton];
    [_dustLatitudeButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(darkenView);
        make.width.equalTo(darkenView).multipliedBy(0.5);
    }];

    
    _nameSpouseView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
    _nameSpouseView.backgroundColor = UIColor.systemGray6Color;
    _nameSpouseView.contentInset = UIEdgeInsetsMake(0, 0, 10, 0);
    _nameSpouseView.separatorStyle = UITableViewCellSeparatorStyleNone;
    _nameSpouseView.rowHeight = DenyQuarter.nowPinReport.eraBorderSin;
    _nameSpouseView.delegate = self;
    _nameSpouseView.dataSource = self;
    [_nameSpouseView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"XXGSelectMobileAccountCell"];

    [self.view addSubview:_nameSpouseView];
    [_nameSpouseView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(DenyQuarter.nowPinReport.postRadians);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(darkenView.mas_top);
    }];

    
    if (self.heapPlural.thatComposite.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_nameSpouseView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _mediaTypeOccur = 0;
    }
}



- (void)frequencyUnsavedCursorsHormoneEachAction:(UIButton *)sender {
    [[AlwaysButManager shared] atomThemeTenWindow];
    if (self.cardPutBarSay && [self.cardPutBarSay respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.cardPutBarSay xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)spellBuiltReadTrainingServicesAction:(UIButton *)sender {
    [[AlwaysButManager shared] atomThemeTenWindow];
    if (self.cardPutBarSay && [self.cardPutBarSay respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:entitledAccount:)]) {
        NSString *entitledAccount = self.heapPlural.thatComposite[self.mediaTypeOccur];
        [self.cardPutBarSay xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.heapPlural entitledAccount:entitledAccount];
    }
}



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

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *rare = [tableView dequeueReusableCellWithIdentifier:@"XXGSelectMobileAccountCell" forIndexPath:indexPath];
    rare.backgroundColor = UIColor.whiteColor;
    rare.selectionStyle = UITableViewCellSelectionStyleNone;
    rare.textLabel.text = self.heapPlural.thatComposite[indexPath.row];
    rare.textLabel.textColor = UIColor.darkGrayColor;
    rare.textLabel.font = [UIFont systemFontOfSize:16];

    
    if (indexPath.row == self.mediaTypeOccur) {
        rare.accessoryType = UITableViewCellAccessoryCheckmark;
        rare.tintColor = [DenyQuarter sameAppleColor];
    } else {
        rare.accessoryType = UITableViewCellAccessoryNone;
    }

    return rare;
}



- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSInteger andTipAxial = self.mediaTypeOccur;
    self.mediaTypeOccur = indexPath.row;

    
    NSMutableArray *mixStillWin = [NSMutableArray array];
    [mixStillWin addObject:[NSIndexPath indexPathForRow:andTipAxial inSection:0]];
    if (andTipAxial != indexPath.row) {
        [mixStillWin addObject:indexPath];
    }
    [tableView reloadRowsAtIndexPaths:mixStillWin withRowAnimation:UITableViewRowAnimationNone];
}

@end
