






#import "ReportingYahooTransmitSimulatesCandidateSwappedViewController.h"
#import "NSString+ReloadPan.h"

@implementation XXGSelectMobileAccountModel

@end

@interface ReportingYahooTransmitSimulatesCandidateSwappedViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *winSendPop;
@property (nonatomic, strong) UITableView *recentIdleView;
@property (nonatomic, assign) NSInteger lawJobMaxToken;
@property (nonatomic, strong) UIButton *tipLargeSunButton;
@property (nonatomic, strong) UIButton *sinHeavyInfoButton;

@end

@implementation ReportingYahooTransmitSimulatesCandidateSwappedViewController

- (XXGSelectMobileAccountModel *)winSendPop {
    return self.forTiedRows;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.sawPageWonButton.hidden = YES;
    self.sheLittleButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = BurstPetite.setupScheduled.callingAcuteLooperTagsEldest;
    titleLabel.textColor = [BurstPetite finalTurnColor];
    titleLabel.font = [UIFont systemFontOfSize:BurstPetite.virtualSheet.menFunnelAir];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(BurstPetite.virtualSheet.partGeneral);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(BurstPetite.virtualSheet.airAuthority);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = BurstPetite.virtualSheet.teluguPencil;

    
    UIView *tipSinView = [[UIView alloc] init];
    tipSinView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:tipSinView];
    [tipSinView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(BurstPetite.virtualSheet.keyFuturePan);
    }];

    
    _tipLargeSunButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_tipLargeSunButton setTitle:BurstPetite.setupScheduled.teethFriend forState:UIControlStateNormal];
    [_tipLargeSunButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_tipLargeSunButton setBackgroundColor:UIColor.systemGray5Color];
    _tipLargeSunButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_tipLargeSunButton addTarget:self action:@selector(adjustNeedRowSubProvisionAction:) forControlEvents:UIControlEventTouchUpInside];
    [tipSinView addSubview:_tipLargeSunButton];
    [_tipLargeSunButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(tipSinView);
        make.width.equalTo(tipSinView).multipliedBy(0.5);
    }];

    
    _sinHeavyInfoButton = [BurstPetite paragraphPicturePositionHisSumColor:BurstPetite.setupScheduled.nowRain];
    [_sinHeavyInfoButton addTarget:self action:@selector(cropAgeBinDecipherSymbolicAction:) forControlEvents:UIControlEventTouchUpInside];
    [tipSinView addSubview:_sinHeavyInfoButton];
    [_sinHeavyInfoButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(tipSinView);
        make.width.equalTo(tipSinView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_recentIdleView];
    [_recentIdleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(BurstPetite.virtualSheet.putBloodSaw);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(tipSinView.mas_top);
    }];

    
    if (self.winSendPop.indexPanorama.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_recentIdleView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _lawJobMaxToken = 0;
    }
}



- (void)adjustNeedRowSubProvisionAction:(UIButton *)sender {
    [[DeleteWhoManager shared] lightCommentWindow];
    if (self.discountExact && [self.discountExact respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.discountExact xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)cropAgeBinDecipherSymbolicAction:(UIButton *)sender {
    [[DeleteWhoManager shared] lightCommentWindow];
    if (self.discountExact && [self.discountExact respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:biometryAccount:)]) {
        NSString *biometryAccount = self.winSendPop.indexPanorama[self.lawJobMaxToken];
        [self.discountExact xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.winSendPop biometryAccount:biometryAccount];
    }
}



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

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

    
    if (indexPath.row == self.lawJobMaxToken) {
        cell.accessoryType = UITableViewCellAccessoryCheckmark;
        cell.tintColor = [BurstPetite finalTurnColor];
    } else {
        cell.accessoryType = UITableViewCellAccessoryNone;
    }

    return cell;
}



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

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

@end
