






#import "ChatMarginBothVolatileSubMildViewController.h"
#import "NSString+DesignArm.h"

@implementation XXGSelectMobileAccountModel

@end

@interface ChatMarginBothVolatileSubMildViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *instantBad;
@property (nonatomic, strong) UITableView *elevenBlobView;
@property (nonatomic, assign) NSInteger driveTwoOptSaw;
@property (nonatomic, strong) UIButton *veryStaySobButton;
@property (nonatomic, strong) UIButton *sortPhoneWaxButton;

@end

@implementation ChatMarginBothVolatileSubMildViewController

- (XXGSelectMobileAccountModel *)instantBad {
    return self.freeKinDark;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.optUseHangButton.hidden = YES;
    self.bleedWarpButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = MainMinimal.tiedTagCertTen.clampForkFollowPortionLyricist;
    titleLabel.textColor = [MainMinimal anyUpsideColor];
    titleLabel.font = [UIFont systemFontOfSize:MainMinimal.nordicPubTen.maxFontMeter];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MainMinimal.nordicPubTen.bagEntitled);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(MainMinimal.nordicPubTen.trustBurmese);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = MainMinimal.nordicPubTen.presetRoute;

    
    UIView *enableView = [[UIView alloc] init];
    enableView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:enableView];
    [enableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(MainMinimal.nordicPubTen.bedUnlockMap);
    }];

    
    _veryStaySobButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_veryStaySobButton setTitle:MainMinimal.tiedTagCertTen.dueParseAll forState:UIControlStateNormal];
    [_veryStaySobButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_veryStaySobButton setBackgroundColor:UIColor.systemGray5Color];
    _veryStaySobButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_veryStaySobButton addTarget:self action:@selector(unlockedRedefinedAlignPinCyrillicAction:) forControlEvents:UIControlEventTouchUpInside];
    [enableView addSubview:_veryStaySobButton];
    [_veryStaySobButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(enableView);
        make.width.equalTo(enableView).multipliedBy(0.5);
    }];

    
    _sortPhoneWaxButton = [MainMinimal grandsonTransportQuarterSchedulerTowerColor:MainMinimal.tiedTagCertTen.pullOwn];
    [_sortPhoneWaxButton addTarget:self action:@selector(averageIndicatedIndicatedRearrangeAlphaAction:) forControlEvents:UIControlEventTouchUpInside];
    [enableView addSubview:_sortPhoneWaxButton];
    [_sortPhoneWaxButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(enableView);
        make.width.equalTo(enableView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_elevenBlobView];
    [_elevenBlobView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(MainMinimal.nordicPubTen.ownOurValue);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(enableView.mas_top);
    }];

    
    if (self.instantBad.chinaBounding.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_elevenBlobView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _driveTwoOptSaw = 0;
    }
}



- (void)unlockedRedefinedAlignPinCyrillicAction:(UIButton *)sender {
    [[VortexBusManager shared] nativeEscapeWindow];
    if (self.bedEveryWrist && [self.bedEveryWrist respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.bedEveryWrist xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)averageIndicatedIndicatedRearrangeAlphaAction:(UIButton *)sender {
    [[VortexBusManager shared] nativeEscapeWindow];
    if (self.bedEveryWrist && [self.bedEveryWrist respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:causeSonAccount:)]) {
        NSString *causeSonAccount = self.instantBad.chinaBounding[self.driveTwoOptSaw];
        [self.bedEveryWrist xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.instantBad causeSonAccount:causeSonAccount];
    }
}



- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.instantBad.chinaBounding.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.instantBad.chinaBounding[indexPath.row];
    cell.textLabel.textColor = UIColor.darkGrayColor;
    cell.textLabel.font = [UIFont systemFontOfSize:16];

    
    if (indexPath.row == self.driveTwoOptSaw) {
        cell.accessoryType = UITableViewCellAccessoryCheckmark;
        cell.tintColor = [MainMinimal anyUpsideColor];
    } else {
        cell.accessoryType = UITableViewCellAccessoryNone;
    }

    return cell;
}



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

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

@end
