






#import "PedometerDividingDeferringTimeUighurStyleViewController.h"
#import "NSString+MidBypass.h"

@implementation XXGSelectMobileAccountModel

@end

@interface PedometerDividingDeferringTimeUighurStyleViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *managedOut;
@property (nonatomic, strong) UITableView *findTwoIcyView;
@property (nonatomic, assign) NSInteger tildeRawWhoUse;
@property (nonatomic, strong) UIButton *entryWonJobButton;
@property (nonatomic, strong) UIButton *speakersTakeButton;

@end

@implementation PedometerDividingDeferringTimeUighurStyleViewController

- (XXGSelectMobileAccountModel *)managedOut {
    return self.hashIllPath;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.jobPanListButton.hidden = YES;
    self.twoPostalButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = MakerOldest.patternsTwenty.finishedCaseOffSchedulerHandover;
    titleLabel.textColor = [MakerOldest caseAboutColor];
    titleLabel.font = [UIFont systemFontOfSize:MakerOldest.redoneFinder.hueRainLegal];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MakerOldest.redoneFinder.featRawPipe);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(MakerOldest.redoneFinder.authorBitmap);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = MakerOldest.redoneFinder.kinClusters;

    
    UIView *cosmicView = [[UIView alloc] init];
    cosmicView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:cosmicView];
    [cosmicView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(MakerOldest.redoneFinder.processedHis);
    }];

    
    _entryWonJobButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_entryWonJobButton setTitle:MakerOldest.patternsTwenty.herAskPiece forState:UIControlStateNormal];
    [_entryWonJobButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_entryWonJobButton setBackgroundColor:UIColor.systemGray5Color];
    _entryWonJobButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_entryWonJobButton addTarget:self action:@selector(socialLockingSinMapStreamAction:) forControlEvents:UIControlEventTouchUpInside];
    [cosmicView addSubview:_entryWonJobButton];
    [_entryWonJobButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(cosmicView);
        make.width.equalTo(cosmicView).multipliedBy(0.5);
    }];

    
    _speakersTakeButton = [MakerOldest sixPipeGrantingNoneBendColor:MakerOldest.patternsTwenty.areaArt];
    [_speakersTakeButton addTarget:self action:@selector(personSpouseCorrectedFocusesDecayAction:) forControlEvents:UIControlEventTouchUpInside];
    [cosmicView addSubview:_speakersTakeButton];
    [_speakersTakeButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(cosmicView);
        make.width.equalTo(cosmicView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_findTwoIcyView];
    [_findTwoIcyView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(MakerOldest.redoneFinder.exposeSpeak);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(cosmicView.mas_top);
    }];

    
    if (self.managedOut.aloneOurTeeth.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_findTwoIcyView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _tildeRawWhoUse = 0;
    }
}



- (void)socialLockingSinMapStreamAction:(UIButton *)sender {
    [[FunnelArmManager shared] undoSilencedWindow];
    if (self.sameSitePanel && [self.sameSitePanel respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.sameSitePanel xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)personSpouseCorrectedFocusesDecayAction:(UIButton *)sender {
    [[FunnelArmManager shared] undoSilencedWindow];
    if (self.sameSitePanel && [self.sameSitePanel respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:stayCellAccount:)]) {
        NSString *stayCellAccount = self.managedOut.aloneOurTeeth[self.tildeRawWhoUse];
        [self.sameSitePanel xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.managedOut stayCellAccount:stayCellAccount];
    }
}



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

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

    
    if (indexPath.row == self.tildeRawWhoUse) {
        exec.accessoryType = UITableViewCellAccessoryCheckmark;
        exec.tintColor = [MakerOldest caseAboutColor];
    } else {
        exec.accessoryType = UITableViewCellAccessoryNone;
    }

    return exec;
}



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

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

@end
