






#import "IndirectSubsetProgramElevenOnceLightenViewController.h"
#import "NSString+BoostTone.h"

@implementation XXGSelectMobileAccountModel

@end

@interface IndirectSubsetProgramElevenOnceLightenViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *acuteMouth;
@property (nonatomic, strong) UITableView *modalExistView;
@property (nonatomic, assign) NSInteger kilogramKorean;
@property (nonatomic, strong) UIButton *ageCalendarButton;
@property (nonatomic, strong) UIButton *zipSixRemoveButton;

@end

@implementation IndirectSubsetProgramElevenOnceLightenViewController

- (XXGSelectMobileAccountModel *)acuteMouth {
    return self.shelfWhoBus;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.loudLegacyButton.hidden = YES;
    self.exclusiveButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = SumWorkTrad.arrayLawAllTop.smallDogProfileThermalElements;
    titleLabel.textColor = [SumWorkTrad alphaPingColor];
    titleLabel.font = [UIFont systemFontOfSize:SumWorkTrad.fastAgeWidth.quantityLeft];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(SumWorkTrad.fastAgeWidth.allLosePage);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(SumWorkTrad.fastAgeWidth.armWetKelvin);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = SumWorkTrad.fastAgeWidth.manWinFinal;

    
    UIView *dryManView = [[UIView alloc] init];
    dryManView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:dryManView];
    [dryManView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(SumWorkTrad.fastAgeWidth.submitEraser);
    }];

    
    _ageCalendarButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_ageCalendarButton setTitle:SumWorkTrad.arrayLawAllTop.crossCancel forState:UIControlStateNormal];
    [_ageCalendarButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_ageCalendarButton setBackgroundColor:UIColor.systemGray5Color];
    _ageCalendarButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_ageCalendarButton addTarget:self action:@selector(sunArePacePashtoStreamAction:) forControlEvents:UIControlEventTouchUpInside];
    [dryManView addSubview:_ageCalendarButton];
    [_ageCalendarButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(dryManView);
        make.width.equalTo(dryManView).multipliedBy(0.5);
    }];

    
    _zipSixRemoveButton = [SumWorkTrad mandatoryTakeNonceSearchUniqueColor:SumWorkTrad.arrayLawAllTop.sonHalf];
    [_zipSixRemoveButton addTarget:self action:@selector(actualCommittedNoneRainExactAction:) forControlEvents:UIControlEventTouchUpInside];
    [dryManView addSubview:_zipSixRemoveButton];
    [_zipSixRemoveButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(dryManView);
        make.width.equalTo(dryManView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_modalExistView];
    [_modalExistView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(SumWorkTrad.fastAgeWidth.danceDuplex);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(dryManView.mas_top);
    }];

    
    if (self.acuteMouth.designerLocal.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_modalExistView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _kilogramKorean = 0;
    }
}



- (void)sunArePacePashtoStreamAction:(UIButton *)sender {
    [[WrestlingManager shared] bedMealScopeWindow];
    if (self.molarEvictMap && [self.molarEvictMap respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.molarEvictMap xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)actualCommittedNoneRainExactAction:(UIButton *)sender {
    [[WrestlingManager shared] bedMealScopeWindow];
    if (self.molarEvictMap && [self.molarEvictMap respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:handlingAccount:)]) {
        NSString *handlingAccount = self.acuteMouth.designerLocal[self.kilogramKorean];
        [self.molarEvictMap xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.acuteMouth handlingAccount:handlingAccount];
    }
}



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

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

    
    if (indexPath.row == self.kilogramKorean) {
        many.accessoryType = UITableViewCellAccessoryCheckmark;
        many.tintColor = [SumWorkTrad alphaPingColor];
    } else {
        many.accessoryType = UITableViewCellAccessoryNone;
    }

    return many;
}



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

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

@end
