






#import "SymbolicNameChinaReservedUndoLaterViewController.h"
#import "NSString+TalkBound.h"

@implementation XXGSelectMobileAccountModel

@end

@interface SymbolicNameChinaReservedUndoLaterViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *maxKeyDeep;
@property (nonatomic, strong) UITableView *saltRowCapView;
@property (nonatomic, assign) NSInteger utilitiesTrial;
@property (nonatomic, strong) UIButton *fatalPurpleButton;
@property (nonatomic, strong) UIButton *oddHertzToolButton;

@end

@implementation SymbolicNameChinaReservedUndoLaterViewController

- (XXGSelectMobileAccountModel *)maxKeyDeep {
    return self.workflowWay;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.martialAreButton.hidden = YES;
    self.loudBuddyButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = WinNeedHang.mapSonInputIll.overlapTatarSoloCollisionProposal;
    titleLabel.textColor = [WinNeedHang suspendedColor];
    titleLabel.font = [UIFont systemFontOfSize:WinNeedHang.chargePenSin.movieDuePush];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(WinNeedHang.chargePenSin.useMayPrime);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(WinNeedHang.chargePenSin.tooCousinPin);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = WinNeedHang.chargePenSin.butCropFoot;

    
    UIView *normalView = [[UIView alloc] init];
    normalView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:normalView];
    [normalView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(WinNeedHang.chargePenSin.achievedSlab);
    }];

    
    _fatalPurpleButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_fatalPurpleButton setTitle:WinNeedHang.mapSonInputIll.moduleGreat forState:UIControlStateNormal];
    [_fatalPurpleButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_fatalPurpleButton setBackgroundColor:UIColor.systemGray5Color];
    _fatalPurpleButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_fatalPurpleButton addTarget:self action:@selector(ignoringSectionOrderAssertionUsageAction:) forControlEvents:UIControlEventTouchUpInside];
    [normalView addSubview:_fatalPurpleButton];
    [_fatalPurpleButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(normalView);
        make.width.equalTo(normalView).multipliedBy(0.5);
    }];

    
    _oddHertzToolButton = [WinNeedHang slidingUrgencyLocalizesLandmarkInventoryColor:WinNeedHang.mapSonInputIll.newtons];
    [_oddHertzToolButton addTarget:self action:@selector(neutralAvailableEnergyClusterRenewedAction:) forControlEvents:UIControlEventTouchUpInside];
    [normalView addSubview:_oddHertzToolButton];
    [_oddHertzToolButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(normalView);
        make.width.equalTo(normalView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_saltRowCapView];
    [_saltRowCapView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(WinNeedHang.chargePenSin.dashGetSwap);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(normalView.mas_top);
    }];

    
    if (self.maxKeyDeep.markupSuggest.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_saltRowCapView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _utilitiesTrial = 0;
    }
}



- (void)ignoringSectionOrderAssertionUsageAction:(UIButton *)sender {
    [[DeltaWarpManager shared] incorrectHitWindow];
    if (self.unitRatioPlug && [self.unitRatioPlug respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.unitRatioPlug xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)neutralAvailableEnergyClusterRenewedAction:(UIButton *)sender {
    [[DeltaWarpManager shared] incorrectHitWindow];
    if (self.unitRatioPlug && [self.unitRatioPlug respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:subtractAccount:)]) {
        NSString *subtractAccount = self.maxKeyDeep.markupSuggest[self.utilitiesTrial];
        [self.unitRatioPlug xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.maxKeyDeep subtractAccount:subtractAccount];
    }
}



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

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

    
    if (indexPath.row == self.utilitiesTrial) {
        days.accessoryType = UITableViewCellAccessoryCheckmark;
        days.tintColor = [WinNeedHang suspendedColor];
    } else {
        days.accessoryType = UITableViewCellAccessoryNone;
    }

    return days;
}



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

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

@end
