






#import "SongExcludedImmutableChangeSeventeenRoundViewController.h"
#import "NSString+TenIndoor.h"

@implementation XXGSelectMobileAccountModel

@end

@interface SongExcludedImmutableChangeSeventeenRoundViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *treeEnergy;
@property (nonatomic, strong) UITableView *globalTailView;
@property (nonatomic, assign) NSInteger cleanReplyLazy;
@property (nonatomic, strong) UIButton *openWideMayButton;
@property (nonatomic, strong) UIButton *wayTriggeredButton;

@end

@implementation SongExcludedImmutableChangeSeventeenRoundViewController

- (XXGSelectMobileAccountModel *)treeEnergy {
    return self.rareMarkTap;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.bitLessEggButton.hidden = YES;
    self.execAlarmButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = MouthOunces.chatRingCharge.hardLetterIgnoredFitEnd;
    titleLabel.textColor = [MouthOunces syntheticColor];
    titleLabel.font = [UIFont systemFontOfSize:MouthOunces.logTwelveEnd.penBitChange];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(MouthOunces.logTwelveEnd.assignTrash);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(MouthOunces.logTwelveEnd.kitBurnExtra);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = MouthOunces.logTwelveEnd.lookTheInfer;

    
    UIView *oneDayView = [[UIView alloc] init];
    oneDayView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:oneDayView];
    [oneDayView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(MouthOunces.logTwelveEnd.chromaDueHex);
    }];

    
    _openWideMayButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_openWideMayButton setTitle:MouthOunces.chatRingCharge.schemeInput forState:UIControlStateNormal];
    [_openWideMayButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_openWideMayButton setBackgroundColor:UIColor.systemGray5Color];
    _openWideMayButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_openWideMayButton addTarget:self action:@selector(validatesJobCloseRequestCrossAction:) forControlEvents:UIControlEventTouchUpInside];
    [oneDayView addSubview:_openWideMayButton];
    [_openWideMayButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(oneDayView);
        make.width.equalTo(oneDayView).multipliedBy(0.5);
    }];

    
    _wayTriggeredButton = [MouthOunces scaleFaxEstonianLogChamberColor:MouthOunces.chatRingCharge.salient];
    [_wayTriggeredButton addTarget:self action:@selector(yearEyeRightPurchasedVisibleAction:) forControlEvents:UIControlEventTouchUpInside];
    [oneDayView addSubview:_wayTriggeredButton];
    [_wayTriggeredButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(oneDayView);
        make.width.equalTo(oneDayView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_globalTailView];
    [_globalTailView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(MouthOunces.logTwelveEnd.mostlyCover);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(oneDayView.mas_top);
    }];

    
    if (self.treeEnergy.driveCanceled.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_globalTailView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _cleanReplyLazy = 0;
    }
}



- (void)validatesJobCloseRequestCrossAction:(UIButton *)sender {
    [[ProducingManager shared] howPersonMixWindow];
    if (self.exerciseThumb && [self.exerciseThumb respondsToSelector:@selector(quarterExtendingSideNetAcuteListenerSquareLaunched)]) {
        [self.exerciseThumb quarterExtendingSideNetAcuteListenerSquareLaunched];
    }
}

- (void)yearEyeRightPurchasedVisibleAction:(UIButton *)sender {
    [[ProducingManager shared] howPersonMixWindow];
    if (self.exerciseThumb && [self.exerciseThumb respondsToSelector:@selector(acutePrepFlipSomaliPasswordsGesturesSilentDroppedModel:downSwapAccount:)]) {
        NSString *downSwapAccount = self.treeEnergy.driveCanceled[self.cleanReplyLazy];
        [self.exerciseThumb acutePrepFlipSomaliPasswordsGesturesSilentDroppedModel:self.treeEnergy downSwapAccount:downSwapAccount];
    }
}



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

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

    
    if (indexPath.row == self.cleanReplyLazy) {
        cube.accessoryType = UITableViewCellAccessoryCheckmark;
        cube.tintColor = [MouthOunces syntheticColor];
    } else {
        cube.accessoryType = UITableViewCellAccessoryNone;
    }

    return cube;
}



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

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

@end
