






#import "IntroCircleFragmentsImageManMasteringViewController.h"
#import "NSString+Magnesium.h"

@implementation XXGSelectMobileAccountModel

@end

@interface IntroCircleFragmentsImageManMasteringViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *numericHue;
@property (nonatomic, strong) UITableView *undoneForkView;
@property (nonatomic, assign) NSInteger wonStandTryAsk;
@property (nonatomic, strong) UIButton *nodeMealSayButton;
@property (nonatomic, strong) UIButton *caseSolidTopButton;

@end

@implementation IntroCircleFragmentsImageManMasteringViewController

- (XXGSelectMobileAccountModel *)numericHue {
    return self.schoolUnify;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.golfRawSumButton.hidden = YES;
    self.itsPickerButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = RowGivenOut.nineHisSoloTen.youPacketPoolGlyphNone;
    titleLabel.textColor = [RowGivenOut drainBackColor];
    titleLabel.font = [UIFont systemFontOfSize:RowGivenOut.mathProxyKin.beganSoloist];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(RowGivenOut.mathProxyKin.theSumThick);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.audibleTotal);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = RowGivenOut.mathProxyKin.delayBinDash;

    
    UIView *expireView = [[UIView alloc] init];
    expireView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:expireView];
    [expireView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(RowGivenOut.mathProxyKin.preservesMax);
    }];

    
    _nodeMealSayButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_nodeMealSayButton setTitle:RowGivenOut.nineHisSoloTen.idiomColumn forState:UIControlStateNormal];
    [_nodeMealSayButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_nodeMealSayButton setBackgroundColor:UIColor.systemGray5Color];
    _nodeMealSayButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_nodeMealSayButton addTarget:self action:@selector(intervalRowsEngravedDiscoveryRetriedAction:) forControlEvents:UIControlEventTouchUpInside];
    [expireView addSubview:_nodeMealSayButton];
    [_nodeMealSayButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(expireView);
        make.width.equalTo(expireView).multipliedBy(0.5);
    }];

    
    _caseSolidTopButton = [RowGivenOut moreCutoffGuestSecondRedefinedColor:RowGivenOut.nineHisSoloTen.mealTwo];
    [_caseSolidTopButton addTarget:self action:@selector(jobDownLessMayReorderAction:) forControlEvents:UIControlEventTouchUpInside];
    [expireView addSubview:_caseSolidTopButton];
    [_caseSolidTopButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(expireView);
        make.width.equalTo(expireView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_undoneForkView];
    [_undoneForkView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(RowGivenOut.mathProxyKin.catInterPen);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(expireView.mas_top);
    }];

    
    if (self.numericHue.imageDownTree.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_undoneForkView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _wonStandTryAsk = 0;
    }
}



- (void)intervalRowsEngravedDiscoveryRetriedAction:(UIButton *)sender {
    [[CapUniqueManager shared] scanCroatianWindow];
    if (self.splatBrowsing && [self.splatBrowsing respondsToSelector:@selector(lightTightScriptMegabitsPluralDispatchPointersConfigure)]) {
        [self.splatBrowsing lightTightScriptMegabitsPluralDispatchPointersConfigure];
    }
}

- (void)jobDownLessMayReorderAction:(UIButton *)sender {
    [[CapUniqueManager shared] scanCroatianWindow];
    if (self.splatBrowsing && [self.splatBrowsing respondsToSelector:@selector(purpleChatScanFailingCascadeRatioFriendSubModel:threeManAccount:)]) {
        NSString *threeManAccount = self.numericHue.imageDownTree[self.wonStandTryAsk];
        [self.splatBrowsing purpleChatScanFailingCascadeRatioFriendSubModel:self.numericHue threeManAccount:threeManAccount];
    }
}



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

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

    
    if (indexPath.row == self.wonStandTryAsk) {
        arts.accessoryType = UITableViewCellAccessoryCheckmark;
        arts.tintColor = [RowGivenOut drainBackColor];
    } else {
        arts.accessoryType = UITableViewCellAccessoryNone;
    }

    return arts;
}



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

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

@end
