






#import "AlongAgentOneOtherAssumeHoldViewController.h"
#import "NSString+Terabytes.h"

@implementation XXGSelectMobileAccountModel

@end

@interface AlongAgentOneOtherAssumeHoldViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *keyBusTied;
@property (nonatomic, strong) UITableView *offFreeWetView;
@property (nonatomic, assign) NSInteger headFullShadow;
@property (nonatomic, strong) UIButton *sawHairCharButton;
@property (nonatomic, strong) UIButton *dayRepairHitButton;

@end

@implementation AlongAgentOneOtherAssumeHoldViewController

- (XXGSelectMobileAccountModel *)keyBusTied {
    return self.moleShotRaw;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.rawPinkCarButton.hidden = YES;
    self.pinchHaveButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = VitalityTab.foggyCycleUnit.auditedJoiningLivePendingHormone;
    titleLabel.textColor = [VitalityTab didCancelColor];
    titleLabel.font = [UIFont systemFontOfSize:VitalityTab.noneMidMicro.layerDidLogo];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(VitalityTab.noneMidMicro.phoneticArt);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(VitalityTab.noneMidMicro.basalHairMid);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = VitalityTab.noneMidMicro.rowsNoneLow;

    
    UIView *markupView = [[UIView alloc] init];
    markupView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:markupView];
    [markupView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(VitalityTab.noneMidMicro.authorityWin);
    }];

    
    _sawHairCharButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_sawHairCharButton setTitle:VitalityTab.foggyCycleUnit.longVirtual forState:UIControlStateNormal];
    [_sawHairCharButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_sawHairCharButton setBackgroundColor:UIColor.systemGray5Color];
    _sawHairCharButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_sawHairCharButton addTarget:self action:@selector(affineSpellPrecisionDirectoryExternAction:) forControlEvents:UIControlEventTouchUpInside];
    [markupView addSubview:_sawHairCharButton];
    [_sawHairCharButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(markupView);
        make.width.equalTo(markupView).multipliedBy(0.5);
    }];

    
    _dayRepairHitButton = [VitalityTab cousinAlertRomanVibrancyIdleColor:VitalityTab.foggyCycleUnit.lookHow];
    [_dayRepairHitButton addTarget:self action:@selector(sinJoinSumRecordingHelloAction:) forControlEvents:UIControlEventTouchUpInside];
    [markupView addSubview:_dayRepairHitButton];
    [_dayRepairHitButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(markupView);
        make.width.equalTo(markupView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_offFreeWetView];
    [_offFreeWetView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(VitalityTab.noneMidMicro.mixTooUnder);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(markupView.mas_top);
    }];

    
    if (self.keyBusTied.offsetMetrics.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_offFreeWetView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _headFullShadow = 0;
    }
}



- (void)affineSpellPrecisionDirectoryExternAction:(UIButton *)sender {
    [[InterlaceManager shared] replyHairSinWindow];
    if (self.outMouthQuiet && [self.outMouthQuiet respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.outMouthQuiet xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)sinJoinSumRecordingHelloAction:(UIButton *)sender {
    [[InterlaceManager shared] replyHairSinWindow];
    if (self.outMouthQuiet && [self.outMouthQuiet respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:pubTrustAccount:)]) {
        NSString *pubTrustAccount = self.keyBusTied.offsetMetrics[self.headFullShadow];
        [self.outMouthQuiet xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.keyBusTied pubTrustAccount:pubTrustAccount];
    }
}



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

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

    
    if (indexPath.row == self.headFullShadow) {
        thin.accessoryType = UITableViewCellAccessoryCheckmark;
        thin.tintColor = [VitalityTab didCancelColor];
    } else {
        thin.accessoryType = UITableViewCellAccessoryNone;
    }

    return thin;
}



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

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

@end
