






#import "CarriageAscentThousandMountedMountSmoothingViewController.h"
#import "NSString+PintDatum.h"

@implementation XXGSelectMobileAccountModel

@end

@interface CarriageAscentThousandMountedMountSmoothingViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *kitBusFace;
@property (nonatomic, strong) UITableView *largeGuestView;
@property (nonatomic, assign) NSInteger stringArtsPool;
@property (nonatomic, strong) UIButton *socketChinaButton;
@property (nonatomic, strong) UIButton *showExistentButton;

@end

@implementation CarriageAscentThousandMountedMountSmoothingViewController

- (XXGSelectMobileAccountModel *)kitBusFace {
    return self.downhillHer;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.clampedDryButton.hidden = YES;
    self.pivotFoodButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = SkinEchoMen.cubePrimeToken.spaBigChunkyOuncesSay;
    titleLabel.textColor = [SkinEchoMen panoramasColor];
    titleLabel.font = [UIFont systemFontOfSize:SkinEchoMen.pauseKirghiz.inuitParsing];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(SkinEchoMen.pauseKirghiz.thickArtery);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(SkinEchoMen.pauseKirghiz.artsIndexFor);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = SkinEchoMen.pauseKirghiz.downBinVital;

    
    UIView *busAnyView = [[UIView alloc] init];
    busAnyView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:busAnyView];
    [busAnyView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(SkinEchoMen.pauseKirghiz.drivenTremor);
    }];

    
    _socketChinaButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_socketChinaButton setTitle:SkinEchoMen.cubePrimeToken.iconPipeFit forState:UIControlStateNormal];
    [_socketChinaButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_socketChinaButton setBackgroundColor:UIColor.systemGray5Color];
    _socketChinaButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_socketChinaButton addTarget:self action:@selector(grayThresholdOpenTextArrangedAction:) forControlEvents:UIControlEventTouchUpInside];
    [busAnyView addSubview:_socketChinaButton];
    [_socketChinaButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(busAnyView);
        make.width.equalTo(busAnyView).multipliedBy(0.5);
    }];

    
    _showExistentButton = [SkinEchoMen anchorsBaselineManNextMediumColor:SkinEchoMen.cubePrimeToken.company];
    [_showExistentButton addTarget:self action:@selector(tokenFunValueCatalogQuickAction:) forControlEvents:UIControlEventTouchUpInside];
    [busAnyView addSubview:_showExistentButton];
    [_showExistentButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(busAnyView);
        make.width.equalTo(busAnyView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_largeGuestView];
    [_largeGuestView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(SkinEchoMen.pauseKirghiz.manMagicWin);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(busAnyView.mas_top);
    }];

    
    if (self.kitBusFace.favoritesSent.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_largeGuestView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _stringArtsPool = 0;
    }
}



- (void)grayThresholdOpenTextArrangedAction:(UIButton *)sender {
    [[OutDemandManager shared] ropeDraftKitWindow];
    if (self.constantBirth && [self.constantBirth respondsToSelector:@selector(passivelyVisualDaysPerformedYearCapUploadingExtern)]) {
        [self.constantBirth passivelyVisualDaysPerformedYearCapUploadingExtern];
    }
}

- (void)tokenFunValueCatalogQuickAction:(UIButton *)sender {
    [[OutDemandManager shared] ropeDraftKitWindow];
    if (self.constantBirth && [self.constantBirth respondsToSelector:@selector(renewingFloatingExpiresEnterThreePeopleNoteExpectModel:withUsesAccount:)]) {
        NSString *withUsesAccount = self.kitBusFace.favoritesSent[self.stringArtsPool];
        [self.constantBirth renewingFloatingExpiresEnterThreePeopleNoteExpectModel:self.kitBusFace withUsesAccount:withUsesAccount];
    }
}



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

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

    
    if (indexPath.row == self.stringArtsPool) {
        sink.accessoryType = UITableViewCellAccessoryCheckmark;
        sink.tintColor = [SkinEchoMen panoramasColor];
    } else {
        sink.accessoryType = UITableViewCellAccessoryNone;
    }

    return sink;
}



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

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

@end
