






#import "PreservesScoreNumberBulgarianFailWidgetViewController.h"
#import "NSString+Enclosing.h"

@implementation XXGSelectMobileAccountModel

@end

@interface PreservesScoreNumberBulgarianFailWidgetViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *ourUseSent;
@property (nonatomic, strong) UITableView *busCancelsView;
@property (nonatomic, assign) NSInteger logWetTwistBad;
@property (nonatomic, strong) UIButton *fixHaveFunkButton;
@property (nonatomic, strong) UIButton *whoScriptTryButton;

@end

@implementation PreservesScoreNumberBulgarianFailWidgetViewController

- (XXGSelectMobileAccountModel *)ourUseSent {
    return self.patchFatYou;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.familyStayButton.hidden = YES;
    self.sentSlideButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = WetDoneFill.wideHostLooper.settingsCertExportChallengeOutside;
    titleLabel.textColor = [WetDoneFill scrollHasColor];
    titleLabel.font = [UIFont systemFontOfSize:WetDoneFill.artSensitive.browsingBusy];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(WetDoneFill.artSensitive.nativeFetch);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(WetDoneFill.artSensitive.bagVitalFile);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = WetDoneFill.artSensitive.yetThirdMax;

    
    UIView *outManView = [[UIView alloc] init];
    outManView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:outManView];
    [outManView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(WetDoneFill.artSensitive.bagEggPetite);
    }];

    
    _fixHaveFunkButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_fixHaveFunkButton setTitle:WetDoneFill.wideHostLooper.offCoverage forState:UIControlStateNormal];
    [_fixHaveFunkButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_fixHaveFunkButton setBackgroundColor:UIColor.systemGray5Color];
    _fixHaveFunkButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_fixHaveFunkButton addTarget:self action:@selector(signingAgeLocalizedReloadFireAction:) forControlEvents:UIControlEventTouchUpInside];
    [outManView addSubview:_fixHaveFunkButton];
    [_fixHaveFunkButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(outManView);
        make.width.equalTo(outManView).multipliedBy(0.5);
    }];

    
    _whoScriptTryButton = [WetDoneFill takeBendReachableResultsDatumColor:WetDoneFill.wideHostLooper.permute];
    [_whoScriptTryButton addTarget:self action:@selector(provinceBedHeapPortraitsAuditAction:) forControlEvents:UIControlEventTouchUpInside];
    [outManView addSubview:_whoScriptTryButton];
    [_whoScriptTryButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(outManView);
        make.width.equalTo(outManView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_busCancelsView];
    [_busCancelsView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(WetDoneFill.artSensitive.kilogramTry);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(outManView.mas_top);
    }];

    
    if (self.ourUseSent.assignDivider.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_busCancelsView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _logWetTwistBad = 0;
    }
}



- (void)signingAgeLocalizedReloadFireAction:(UIButton *)sender {
    [[SockLevelManager shared] requireSpellWindow];
    if (self.notHerFoldOld && [self.notHerFoldOld respondsToSelector:@selector(remembersIgnoringSonStrongestNotOperandEnumerateAscending)]) {
        [self.notHerFoldOld remembersIgnoringSonStrongestNotOperandEnumerateAscending];
    }
}

- (void)provinceBedHeapPortraitsAuditAction:(UIButton *)sender {
    [[SockLevelManager shared] requireSpellWindow];
    if (self.notHerFoldOld && [self.notHerFoldOld respondsToSelector:@selector(levelFailRaisePreventedChineseFactSameSuspendedModel:sinSevenAccount:)]) {
        NSString *sinSevenAccount = self.ourUseSent.assignDivider[self.logWetTwistBad];
        [self.notHerFoldOld levelFailRaisePreventedChineseFactSameSuspendedModel:self.ourUseSent sinSevenAccount:sinSevenAccount];
    }
}



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

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

    
    if (indexPath.row == self.logWetTwistBad) {
        lose.accessoryType = UITableViewCellAccessoryCheckmark;
        lose.tintColor = [WetDoneFill scrollHasColor];
    } else {
        lose.accessoryType = UITableViewCellAccessoryNone;
    }

    return lose;
}



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

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

@end
