






#import "OnceHerMirroredCardWhoLeftoverViewController.h"
#import "NSString+RankRetry.h"

@implementation XXGSelectMobileAccountModel

@end

@interface OnceHerMirroredCardWhoLeftoverViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *netHintIll;
@property (nonatomic, strong) UITableView *fusionSortView;
@property (nonatomic, assign) NSInteger menTooCloseAre;
@property (nonatomic, strong) UIButton *execBusySayButton;
@property (nonatomic, strong) UIButton *outputPersonButton;

@end

@implementation OnceHerMirroredCardWhoLeftoverViewController

- (XXGSelectMobileAccountModel *)netHintIll {
    return self.retCellStay;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.fourMinderButton.hidden = YES;
    self.protocolsButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = ForHueAfter.stayFourthHint.hiddenVideoExclusiveRelevanceUndo;
    titleLabel.textColor = [ForHueAfter requiringColor];
    titleLabel.font = [UIFont systemFontOfSize:ForHueAfter.grayGradient.makeSubFocal];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(ForHueAfter.grayGradient.nowNineteen);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(ForHueAfter.grayGradient.panKelvinCap);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = ForHueAfter.grayGradient.maxAlphaSon;

    
    UIView *searchView = [[UIView alloc] init];
    searchView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:searchView];
    [searchView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(ForHueAfter.grayGradient.autoChanging);
    }];

    
    _execBusySayButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_execBusySayButton setTitle:ForHueAfter.stayFourthHint.feedRetTied forState:UIControlStateNormal];
    [_execBusySayButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_execBusySayButton setBackgroundColor:UIColor.systemGray5Color];
    _execBusySayButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_execBusySayButton addTarget:self action:@selector(winAttributeContentBedMemoryAction:) forControlEvents:UIControlEventTouchUpInside];
    [searchView addSubview:_execBusySayButton];
    [_execBusySayButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(searchView);
        make.width.equalTo(searchView).multipliedBy(0.5);
    }];

    
    _outputPersonButton = [ForHueAfter scoreYearArbitraryMapDecigramsColor:ForHueAfter.stayFourthHint.putWork];
    [_outputPersonButton addTarget:self action:@selector(relatedYouResolvedLegalLoopsAction:) forControlEvents:UIControlEventTouchUpInside];
    [searchView addSubview:_outputPersonButton];
    [_outputPersonButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(searchView);
        make.width.equalTo(searchView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_fusionSortView];
    [_fusionSortView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(ForHueAfter.grayGradient.armQueryAdd);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(searchView.mas_top);
    }];

    
    if (self.netHintIll.strokingRadio.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_fusionSortView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _menTooCloseAre = 0;
    }
}



- (void)winAttributeContentBedMemoryAction:(UIButton *)sender {
    [[EarColumnManager shared] decodeDigestWindow];
    if (self.molarSunAlbum && [self.molarSunAlbum respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.molarSunAlbum xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)relatedYouResolvedLegalLoopsAction:(UIButton *)sender {
    [[EarColumnManager shared] decodeDigestWindow];
    if (self.molarSunAlbum && [self.molarSunAlbum respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:writeBoxAccount:)]) {
        NSString *writeBoxAccount = self.netHintIll.strokingRadio[self.menTooCloseAre];
        [self.molarSunAlbum xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.netHintIll writeBoxAccount:writeBoxAccount];
    }
}



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

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

    
    if (indexPath.row == self.menTooCloseAre) {
        foot.accessoryType = UITableViewCellAccessoryCheckmark;
        foot.tintColor = [ForHueAfter requiringColor];
    } else {
        foot.accessoryType = UITableViewCellAccessoryNone;
    }

    return foot;
}



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

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

@end
