






#import "OneAutomaticCellEchoSegmentsExportingViewController.h"
#import "NSString+PrettyHex.h"

@implementation XXGSelectMobileAccountModel

@end

@interface OneAutomaticCellEchoSegmentsExportingViewController () <UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) XXGSelectMobileAccountModel *neutralMan;
@property (nonatomic, strong) UITableView *foodDivideView;
@property (nonatomic, assign) NSInteger speakUndoRound;
@property (nonatomic, strong) UIButton *arePopDirtyButton;
@property (nonatomic, strong) UIButton *molarPubDustButton;

@end

@implementation OneAutomaticCellEchoSegmentsExportingViewController

- (XXGSelectMobileAccountModel *)neutralMan {
    return self.modalKeyDid;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.bagDesktopButton.hidden = YES;
    self.greatRainButton.hidden = YES;

    
    UILabel *titleLabel = [UILabel new];
    titleLabel.text = PinMovement.otherPhasePlug.rationalGoogleManagerMetricSpectral;
    titleLabel.textColor = [PinMovement unorderedColor];
    titleLabel.font = [UIFont systemFontOfSize:PinMovement.cupFormatSun.consumedBank];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLabel];
    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(PinMovement.cupFormatSun.foundTipCar);
        make.left.right.equalTo(self.view);
        make.height.mas_equalTo(PinMovement.cupFormatSun.flipTrustDue);
    }];

    self.view.clipsToBounds = YES;
    self.view.layer.cornerRadius = PinMovement.cupFormatSun.areFixElder;

    
    UIView *alpineView = [[UIView alloc] init];
    alpineView.backgroundColor = UIColor.whiteColor;
    [self.view addSubview:alpineView];
    [alpineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.equalTo(self.view);
        make.height.mas_equalTo(PinMovement.cupFormatSun.forkDenseJob);
    }];

    
    _arePopDirtyButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [_arePopDirtyButton setTitle:PinMovement.otherPhasePlug.alarmExtend forState:UIControlStateNormal];
    [_arePopDirtyButton setTitleColor:UIColor.darkGrayColor forState:UIControlStateNormal];
    [_arePopDirtyButton setBackgroundColor:UIColor.systemGray5Color];
    _arePopDirtyButton.titleLabel.font = [UIFont systemFontOfSize:16];
    [_arePopDirtyButton addTarget:self action:@selector(pingDefineLappishShipmentOutAction:) forControlEvents:UIControlEventTouchUpInside];
    [alpineView addSubview:_arePopDirtyButton];
    [_arePopDirtyButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.equalTo(alpineView);
        make.width.equalTo(alpineView).multipliedBy(0.5);
    }];

    
    _molarPubDustButton = [PinMovement narrativeForbidAlignedAcuteGrayColor:PinMovement.otherPhasePlug.showLaw];
    [_molarPubDustButton addTarget:self action:@selector(armenianArmDefineUserMathAction:) forControlEvents:UIControlEventTouchUpInside];
    [alpineView addSubview:_molarPubDustButton];
    [_molarPubDustButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.top.bottom.equalTo(alpineView);
        make.width.equalTo(alpineView).multipliedBy(0.5);
    }];

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

    [self.view addSubview:_foodDivideView];
    [_foodDivideView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(titleLabel.mas_bottom).offset(PinMovement.cupFormatSun.burstDetail);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(alpineView.mas_top);
    }];

    
    if (self.neutralMan.matchThemeOur.count > 0) {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
        [_foodDivideView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        _speakUndoRound = 0;
    }
}



- (void)pingDefineLappishShipmentOutAction:(UIButton *)sender {
    [[UnpluggedManager shared] policyHitOurWindow];
    if (self.flagTrapMixer && [self.flagTrapMixer respondsToSelector:@selector(xxpk_selectMobileAccountCancelButtonDidClick)]) {
        [self.flagTrapMixer xxpk_selectMobileAccountCancelButtonDidClick];
    }
}

- (void)armenianArmDefineUserMathAction:(UIButton *)sender {
    [[UnpluggedManager shared] policyHitOurWindow];
    if (self.flagTrapMixer && [self.flagTrapMixer respondsToSelector:@selector(xxpk_selectMobileAccountConfirmButtonDidClickWithModel:replyDayAccount:)]) {
        NSString *replyDayAccount = self.neutralMan.matchThemeOur[self.speakUndoRound];
        [self.flagTrapMixer xxpk_selectMobileAccountConfirmButtonDidClickWithModel:self.neutralMan replyDayAccount:replyDayAccount];
    }
}



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

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

    
    if (indexPath.row == self.speakUndoRound) {
        loop.accessoryType = UITableViewCellAccessoryCheckmark;
        loop.tintColor = [PinMovement unorderedColor];
    } else {
        loop.accessoryType = UITableViewCellAccessoryNone;
    }

    return loop;
}



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

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

@end
